firmware/build_patches/kernel_ar71xx_36664.patch

284 lines
10 KiB
Diff

Index: files/arch/mips/ath79/mach-dir-825-b1.c
===================================================================
--- files/arch/mips/ath79/mach-dir-825-b1.c (Revision 35298)
+++ files/arch/mips/ath79/mach-dir-825-b1.c (Revision 36664)
@@ -138,7 +138,8 @@
static void __init dir825b1_wlan_init(void)
{
u8 *caldata;
- u8 mac1[ETH_ALEN], mac2[ETH_ALEN];
+ u8 mac0[ETH_ALEN], mac1[ETH_ALEN];
+ u8 wmac0[ETH_ALEN], wmac1[ETH_ALEN];
caldata = (u8 *) KSEG1ADDR(DIR825B1_CAL_LOCATION_0);
if (!dir825b1_is_caldata_valid(caldata)) {
@@ -149,17 +150,19 @@
}
}
- dir825b1_read_ascii_mac(mac1, caldata + DIR825B1_MAC0_OFFSET);
- dir825b1_read_ascii_mac(mac2, caldata + DIR825B1_MAC1_OFFSET);
+ dir825b1_read_ascii_mac(mac0, caldata + DIR825B1_MAC0_OFFSET);
+ dir825b1_read_ascii_mac(mac1, caldata + DIR825B1_MAC1_OFFSET);
- ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 2);
- ath79_init_mac(ath79_eth1_data.mac_addr, mac1, 3);
+ ath79_init_mac(ath79_eth0_data.mac_addr, mac0, 0);
+ ath79_init_mac(ath79_eth1_data.mac_addr, mac1, 0);
+ ath79_init_mac(wmac0, mac0, 0);
+ ath79_init_mac(wmac1, mac1, 1);
ap9x_pci_setup_wmac_led_pin(0, 5);
ap9x_pci_setup_wmac_led_pin(1, 5);
- ap94_pci_init(caldata + DIR825B1_CAL0_OFFSET, mac1,
- caldata + DIR825B1_CAL1_OFFSET, mac2);
+ ap94_pci_init(caldata + DIR825B1_CAL0_OFFSET, wmac0,
+ caldata + DIR825B1_CAL1_OFFSET, wmac1);
}
static void __init dir825b1_setup(void)
Index: files/arch/mips/ath79/mach-rb750.c
===================================================================
--- files/arch/mips/ath79/mach-rb750.c (Revision 35298)
+++ files/arch/mips/ath79/mach-rb750.c (Revision 36664)
@@ -282,7 +282,6 @@
#define RB751_HARDCONFIG 0x1f00b000
#define RB751_HARDCONFIG_SIZE 0x1000
-#define RB751_MAC_ADDRESS_OFFSET 0xE80
static void __init rb751_wlan_setup(void)
{
@@ -290,6 +289,8 @@
struct ath9k_platform_data *wmac_data;
u16 tag_len;
u8 *tag;
+ u16 mac_len;
+ u8 *mac;
int err;
wmac_data = ap9x_pci_get_wmac_data(0);
@@ -314,7 +315,14 @@
return;
}
- ap91_pci_init(NULL, hardconfig + RB751_MAC_ADDRESS_OFFSET);
+ err = routerboot_find_tag(hardconfig, RB751_HARDCONFIG_SIZE,
+ RB_ID_MAC_ADDRESS_PACK, &mac, &mac_len);
+ if (err) {
+ pr_err("rb75x: no mac address found\n");
+ return;
+ }
+
+ ap91_pci_init(NULL, mac);
}
static void __init rb751_setup(void)
Index: files/arch/mips/ath79/mach-om2p.c
===================================================================
--- files/arch/mips/ath79/mach-om2p.c (Revision 35298)
+++ files/arch/mips/ath79/mach-om2p.c (Revision 36664)
@@ -187,7 +187,7 @@
/* enable reset button */
ath79_gpio_output_select(OM2P_GPIO_BTN_RESET, AR934X_GPIO_OUT_GPIO);
- ath79_gpio_function_enable(AR933X_GPIO_FUNC_JTAG_DISABLE);
+ ath79_gpio_function_enable(AR934X_GPIO_FUNC_JTAG_DISABLE);
om2p_leds_gpio[4].gpio = OM2P_GPIO_LED_WAN;
om2p_leds_gpio[5].gpio = OM2P_GPIO_LED_LAN;
Index: files/arch/mips/ath79/mach-rb4xx.c
===================================================================
--- files/arch/mips/ath79/mach-rb4xx.c (Revision 35298)
+++ files/arch/mips/ath79/mach-rb4xx.c (Revision 36664)
@@ -429,6 +429,9 @@
rb4xx_leds_gpio);
spi_register_board_info(rb4xx_spi_info, ARRAY_SIZE(rb4xx_spi_info));
+ spi_register_board_info(rb4xx_microsd_info,
+ ARRAY_SIZE(rb4xx_microsd_info));
+
platform_device_register(&rb4xx_spi_device);
platform_device_register(&rb4xx_nand_device);
Index: image/Makefile
===================================================================
--- image/Makefile (Revision 35298)
+++ image/Makefile (Revision 36664)
@@ -279,6 +279,10 @@
fi
endef
+define Image/Build/WZRHPG30XNH/initramfs
+ $(call MkuImageLzma/initramfs,$(2),$(3) $(4))
+endef
+
define Image/Build/WHRHPG300N
$(call MkuImageLzma,$(2),$(3) $(4))
$(call Sysupgrade/KRuImage,$(1),$(2),983040,2883584)
Index: patches-3.3/480-ar913x_wmac_external_reset.patch
===================================================================
--- patches-3.3/480-ar913x_wmac_external_reset.patch (Revision 0)
+++ patches-3.3/480-ar913x_wmac_external_reset.patch (Revision 36664)
@@ -0,0 +1,31 @@
+--- a/arch/mips/ath79/dev-wmac.c
++++ b/arch/mips/ath79/dev-wmac.c
+@@ -44,7 +44,7 @@ static struct platform_device ath79_wmac
+ },
+ };
+
+-static void __init ar913x_wmac_setup(void)
++static int ar913x_wmac_reset(void)
+ {
+ /* reset the WMAC */
+ ath79_device_reset_set(AR913X_RESET_AMBA2WMAC);
+@@ -53,10 +53,19 @@ static void __init ar913x_wmac_setup(voi
+ ath79_device_reset_clear(AR913X_RESET_AMBA2WMAC);
+ mdelay(10);
+
++ return 0;
++}
++
++static void __init ar913x_wmac_setup(void)
++{
++ ar913x_wmac_reset();
++
+ ath79_wmac_resources[0].start = AR913X_WMAC_BASE;
+ ath79_wmac_resources[0].end = AR913X_WMAC_BASE + AR913X_WMAC_SIZE - 1;
+ ath79_wmac_resources[1].start = ATH79_CPU_IRQ_IP2;
+ ath79_wmac_resources[1].end = ATH79_CPU_IRQ_IP2;
++
++ ath79_wmac_data.external_reset = ar913x_wmac_reset;
+ }
+
+
Index: patches-3.3/505-MIPS-ath79-add-ath79_gpio_function_select.patch
===================================================================
--- patches-3.3/505-MIPS-ath79-add-ath79_gpio_function_select.patch (Revision 35298)
+++ patches-3.3/505-MIPS-ath79-add-ath79_gpio_function_select.patch (Revision 36664)
@@ -10,7 +10,7 @@
#endif /* __ATH79_COMMON_H */
--- a/arch/mips/ath79/gpio.c
+++ b/arch/mips/ath79/gpio.c
-@@ -198,6 +198,34 @@ void ath79_gpio_function_setup(u32 set,
+@@ -198,6 +198,34 @@ void ath79_gpio_function_setup(u32 set,
spin_unlock_irqrestore(&ath79_gpio_lock, flags);
}
Index: patches-3.3/620-MIPS-ath79-OTP-support.patch
===================================================================
--- patches-3.3/620-MIPS-ath79-OTP-support.patch (Revision 35298)
+++ patches-3.3/620-MIPS-ath79-OTP-support.patch (Revision 36664)
@@ -1,6 +1,6 @@
--- a/arch/mips/ath79/dev-wmac.c
+++ b/arch/mips/ath79/dev-wmac.c
-@@ -139,6 +139,137 @@ static void qca955x_wmac_setup(void)
+@@ -148,6 +148,137 @@ static void qca955x_wmac_setup(void)
ath79_wmac_data.is_clk_25mhz = true;
}
Index: patches-3.3/601-MIPS-ath79-add-more-register-defines.patch
===================================================================
--- patches-3.3/601-MIPS-ath79-add-more-register-defines.patch (Revision 35298)
+++ patches-3.3/601-MIPS-ath79-add-more-register-defines.patch (Revision 36664)
@@ -166,7 +166,7 @@
#define AR934X_GPIO_REG_FUNC 0x6c
#define AR71XX_GPIO_COUNT 16
-@@ -550,4 +618,133 @@
+@@ -550,4 +618,139 @@
#define AR934X_SRIF_DPLL2_OUTDIV_SHIFT 13
#define AR934X_SRIF_DPLL2_OUTDIV_MASK 0x7
@@ -227,9 +227,15 @@
+#define AR933X_GPIO_FUNC_UART_EN BIT(1)
+#define AR933X_GPIO_FUNC_JTAG_DISABLE BIT(0)
+
-+#define AR934X_GPIO_FUNC_DDR_DQOE_EN BIT(17)
-+#define AR934X_GPIO_FUNC_SPI_CS_1_EN BIT(14)
-+#define AR934X_GPIO_FUNC_SPI_CS_0_EN BIT(13)
++#define AR934X_GPIO_FUNC_CLK_OBS7_EN BIT(9)
++#define AR934X_GPIO_FUNC_CLK_OBS6_EN BIT(8)
++#define AR934X_GPIO_FUNC_CLK_OBS5_EN BIT(7)
++#define AR934X_GPIO_FUNC_CLK_OBS4_EN BIT(6)
++#define AR934X_GPIO_FUNC_CLK_OBS3_EN BIT(5)
++#define AR934X_GPIO_FUNC_CLK_OBS2_EN BIT(4)
++#define AR934X_GPIO_FUNC_CLK_OBS1_EN BIT(3)
++#define AR934X_GPIO_FUNC_CLK_OBS0_EN BIT(2)
++#define AR934X_GPIO_FUNC_JTAG_DISABLE BIT(1)
+
+#define AR934X_GPIO_OUT_GPIO 0x00
+
Index: patches-3.3/501-MIPS-ath79-add-mac-argument-to-ath79_register_wmac.patch
===================================================================
--- patches-3.3/501-MIPS-ath79-add-mac-argument-to-ath79_register_wmac.patch (Revision 35298)
+++ patches-3.3/501-MIPS-ath79-add-mac-argument-to-ath79_register_wmac.patch (Revision 36664)
@@ -16,7 +16,7 @@
static struct ath9k_platform_data ath79_wmac_data;
static struct resource ath79_wmac_resources[] = {
-@@ -134,7 +136,7 @@ static void qca955x_wmac_setup(void)
+@@ -143,7 +145,7 @@ static void qca955x_wmac_setup(void)
ath79_wmac_data.is_clk_25mhz = true;
}
@@ -25,7 +25,7 @@
{
if (soc_is_ar913x())
ar913x_wmac_setup();
-@@ -151,5 +153,10 @@ void __init ath79_register_wmac(u8 *cal_
+@@ -160,5 +162,10 @@ void __init ath79_register_wmac(u8 *cal_
memcpy(ath79_wmac_data.eeprom_data, cal_data,
sizeof(ath79_wmac_data.eeprom_data));
Index: patches-3.3/621-MIPS-ath79-add-ath79_wmac_disable_25ghz-helpers.patch
===================================================================
--- patches-3.3/621-MIPS-ath79-add-ath79_wmac_disable_25ghz-helpers.patch (Revision 35298)
+++ patches-3.3/621-MIPS-ath79-add-ath79_wmac_disable_25ghz-helpers.patch (Revision 36664)
@@ -1,6 +1,6 @@
--- a/arch/mips/ath79/dev-wmac.c
+++ b/arch/mips/ath79/dev-wmac.c
-@@ -270,6 +270,16 @@ bool __init ar93xx_wmac_read_mac_address
+@@ -279,6 +279,16 @@ bool __init ar93xx_wmac_read_mac_address
return ret;
}
Index: patches-3.3/650-MIPS-ath79-fix-ar933x-reset.patch
===================================================================
--- patches-3.3/650-MIPS-ath79-fix-ar933x-reset.patch (Revision 35298)
+++ patches-3.3/650-MIPS-ath79-fix-ar933x-reset.patch (Revision 36664)
@@ -1,6 +1,6 @@
--- a/arch/mips/ath79/dev-wmac.c
+++ b/arch/mips/ath79/dev-wmac.c
-@@ -67,10 +67,27 @@ static void __init ar913x_wmac_setup(voi
+@@ -76,10 +76,27 @@ static void __init ar913x_wmac_setup(voi
static int ar933x_wmac_reset(void)
{
Index: patches-3.3/606-MIPS-ath79-pb44-fixes.patch
===================================================================
--- patches-3.3/606-MIPS-ath79-pb44-fixes.patch (Revision 35298)
+++ patches-3.3/606-MIPS-ath79-pb44-fixes.patch (Revision 36664)
@@ -50,7 +50,7 @@
#define PB44_GPIO_SW_RESET (PB44_GPIO_EXP_BASE + 6)
#define PB44_GPIO_SW_JUMP (PB44_GPIO_EXP_BASE + 8)
#define PB44_GPIO_LED_JUMP1 (PB44_GPIO_EXP_BASE + 9)
-@@ -92,21 +117,66 @@ static struct ath79_spi_controller_data
+@@ -92,21 +117,66 @@ static struct ath79_spi_controller_data
.cs_line = 0,
};
Index: patches-3.3/521-MIPS-ath79-enable-UART-for-early_serial.patch
===================================================================
--- patches-3.3/521-MIPS-ath79-enable-UART-for-early_serial.patch (Revision 35298)
+++ patches-3.3/521-MIPS-ath79-enable-UART-for-early_serial.patch (Revision 36664)
@@ -1,6 +1,6 @@
--- a/arch/mips/ath79/early_printk.c
+++ b/arch/mips/ath79/early_printk.c
-@@ -56,6 +56,46 @@ static void prom_putchar_dummy(unsigned
+@@ -56,6 +56,46 @@ static void prom_putchar_dummy(unsigned
/* nothing to do */
}