mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-10-30 21:44:27 -04:00 
			
		
		
		
	Patches and configuration apply just fine on the Marvell Orion target. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
		
			
				
	
	
		
			76 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			76 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| --- a/arch/arm/mach-orion5x/Kconfig
 | |
| +++ b/arch/arm/mach-orion5x/Kconfig
 | |
| @@ -147,10 +147,13 @@ config MACH_MSS2_DT
 | |
|  	  Maxtor Shared Storage II platform.
 | |
|  
 | |
|  config MACH_WNR854T
 | |
| -	bool "Netgear WNR854T"
 | |
| +	bool "Netgear WNR854T / WN802T"
 | |
|  	help
 | |
|  	  Say 'Y' here if you want your kernel to support the
 | |
| -	  Netgear WNR854T platform.
 | |
| +	  Netgear WNR854T or WN802T platform.
 | |
| +
 | |
| +config MACH_WN802T
 | |
| +	def_bool MACH_WNR854T
 | |
|  
 | |
|  config MACH_RD88F5181L_GE
 | |
|  	bool "Marvell Orion-VoIP GE Reference Design"
 | |
| --- a/arch/arm/mach-orion5x/wnr854t-setup.c
 | |
| +++ b/arch/arm/mach-orion5x/wnr854t-setup.c
 | |
| @@ -115,6 +115,15 @@ static struct dsa_platform_data wnr854t_
 | |
|  	.chip		= &wnr854t_switch_chip_data,
 | |
|  };
 | |
|  
 | |
| +static struct dsa_chip_data wn802t_switch_chip_data = {
 | |
| +	.port_names[2] = "wan",
 | |
| +	.port_names[3] = "cpu",
 | |
| +};
 | |
| +
 | |
| +static struct dsa_platform_data wn802t_switch_plat_data = {
 | |
| +	.nr_chips	= 1,
 | |
| +	.chip		= &wn802t_switch_chip_data,
 | |
| +};
 | |
|  static void __init wnr854t_init(void)
 | |
|  {
 | |
|  	/*
 | |
| @@ -128,7 +137,12 @@ static void __init wnr854t_init(void)
 | |
|  	 * Configure peripherals.
 | |
|  	 */
 | |
|  	orion5x_eth_init(&wnr854t_eth_data);
 | |
| -	orion5x_eth_switch_init(&wnr854t_switch_plat_data, NO_IRQ);
 | |
| +
 | |
| +	if (machine_is_wn802t())
 | |
| +		orion5x_eth_switch_init(&wn802t_switch_plat_data, NO_IRQ);
 | |
| +	else
 | |
| +		orion5x_eth_switch_init(&wnr854t_switch_plat_data, NO_IRQ);
 | |
| +
 | |
|  	orion5x_uart0_init();
 | |
|  
 | |
|  	mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET,
 | |
| @@ -168,7 +182,7 @@ static struct hw_pci wnr854t_pci __initd
 | |
|  
 | |
|  static int __init wnr854t_pci_init(void)
 | |
|  {
 | |
| -	if (machine_is_wnr854t())
 | |
| +	if (machine_is_wnr854t() || machine_is_wn802t())
 | |
|  		pci_common_init(&wnr854t_pci);
 | |
|  
 | |
|  	return 0;
 | |
| @@ -186,3 +200,15 @@ MACHINE_START(WNR854T, "Netgear WNR854T"
 | |
|  	.fixup		= tag_fixup_mem32,
 | |
|  	.restart	= orion5x_restart,
 | |
|  MACHINE_END
 | |
| +
 | |
| +MACHINE_START(WN802T, "Netgear WN802T")
 | |
| +	/* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
 | |
| +	.atag_offset	= 0x100,
 | |
| +	.init_machine	= wnr854t_init,
 | |
| +	.map_io		= orion5x_map_io,
 | |
| +	.init_early	= orion5x_init_early,
 | |
| +	.init_irq	= orion5x_init_irq,
 | |
| +	.init_time	= orion5x_timer_init,
 | |
| +	.fixup		= tag_fixup_mem32,
 | |
| +	.restart	= orion5x_restart,
 | |
| +MACHINE_END
 |