aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rw-r--r--target/linux/atheros/patches-3.10/100-board.patch26
-rw-r--r--target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch20
-rw-r--r--target/linux/atheros/patches-3.10/130-watchdog.patch11
-rw-r--r--target/linux/atheros/patches-3.10/140-redboot_boardconfig.patch5
-rw-r--r--target/linux/atheros/patches-3.10/142-redboot_various_erase_size_fix.patch6
-rw-r--r--target/linux/atheros/patches-3.10/220-enet_micrel_workaround.patch4
-rw-r--r--target/linux/atheros/patches-3.10/230-3_10-updates.patch2
7 files changed, 32 insertions, 42 deletions
diff --git a/target/linux/atheros/patches-3.10/100-board.patch b/target/linux/atheros/patches-3.10/100-board.patch
index 7192a7b1dc..5c81e02a16 100644
--- a/target/linux/atheros/patches-3.10/100-board.patch
+++ b/target/linux/atheros/patches-3.10/100-board.patch
@@ -121,9 +121,9 @@
+check_radio_magic(u8 *addr)
+{
+ addr += 0x7a; /* offset for flash magic */
-+ if ((addr[0] == 0x5a) && (addr[1] == 0xa5)) {
++ if ((addr[0] == 0x5a) && (addr[1] == 0xa5))
+ return 1;
-+ }
++
+ return 0;
+}
+
@@ -638,7 +638,7 @@
+#endif /* __ASM_MACH_GENERIC_DMA_COHERENCE_H */
--- /dev/null
+++ b/arch/mips/include/asm/mach-ar231x/gpio.h
-@@ -0,0 +1,28 @@
+@@ -0,0 +1,30 @@
+#ifndef _ATHEROS_GPIO_H_
+#define _ATHEROS_GPIO_H_
+
@@ -655,12 +655,14 @@
+/* not sure if these are used? */
+
+/* Returns IRQ to attach for gpio. Unchecked function */
-+static inline int gpio_to_irq(unsigned gpio) {
++static inline int gpio_to_irq(unsigned gpio)
++{
+ return AR531X_GPIO_IRQ(gpio);
+}
+
+/* Returns gpio for IRQ attached. Unchecked function */
-+static inline int irq_to_gpio(unsigned irq) {
++static inline int irq_to_gpio(unsigned irq)
++{
+ return irq - AR531X_GPIO_IRQ(0);
+}
+
@@ -1524,7 +1526,7 @@
+
--- /dev/null
+++ b/arch/mips/ar231x/ar5312.c
-@@ -0,0 +1,580 @@
+@@ -0,0 +1,579 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
@@ -1959,9 +1961,8 @@
+{
+ /* reset the system */
+ local_irq_disable();
-+ while(1) {
++ while (1)
+ ar231x_write_reg(AR531X_RESET, AR531X_RESET_SYSTEM);
-+ }
+}
+
+
@@ -2027,9 +2028,9 @@
+ predivisor = clockctl1_predivide_table[predivide_select];
+ multiplier = (clock_ctl1 & multiplier_mask) >> multiplier_shift;
+
-+ if (clock_ctl1 & doubler_mask) {
++ if (clock_ctl1 & doubler_mask)
+ multiplier = multiplier << 1;
-+ }
++
+ return (40000000 / predivisor) * multiplier;
+}
+
@@ -2107,7 +2108,7 @@
+
--- /dev/null
+++ b/arch/mips/ar231x/ar2315.c
-@@ -0,0 +1,693 @@
+@@ -0,0 +1,692 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
@@ -2602,8 +2603,7 @@
+ int i, led = 0;
+
+ ar2315_led_data.num_leds = 0;
-+ for(i = 1; i < 8; i++)
-+ {
++ for (i = 1; i < 8; i++) {
+ if((i == AR2315_RESET_GPIO) ||
+ (i == ar231x_board.config->reset_config_gpio))
+ continue;
diff --git a/target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch b/target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch
index 38b29691bf..13ae8a4e27 100644
--- a/target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch
+++ b/target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch
@@ -32,7 +32,7 @@
+obj-$(CONFIG_NET_VENDOR_AR231X) += ar231x.o
--- /dev/null
+++ b/drivers/net/ethernet/ar231x/ar231x.c
-@@ -0,0 +1,1266 @@
+@@ -0,0 +1,1260 @@
+/*
+ * ar231x.c: Linux driver for the Atheros AR231x Ethernet device.
+ *
@@ -535,7 +535,6 @@
+
+ add_timer(&sp->link_timer);
+ return 0;
-+
+}
+
+static void ar231x_link_timer_fn(unsigned long data)
@@ -554,11 +553,10 @@
+ * Loop faster when we don't have link.
+ * This was needed to speed up the AP bootstrap time.
+ */
-+ if (sp->link == 0) {
++ if (sp->link == 0)
+ mod_timer(&sp->link_timer, jiffies + HZ / 2);
-+ } else {
++ else
+ mod_timer(&sp->link_timer, jiffies + LINK_TIMER);
-+ }
+}
+
+static void ar231x_check_link(struct net_device *dev)
@@ -764,7 +762,6 @@
+ */
+static void ar231x_load_rx_ring(struct net_device *dev, int nr_bufs)
+{
-+
+ struct ar231x_private *sp = netdev_priv(dev);
+ short i, idx;
+
@@ -824,9 +821,9 @@
+
+ /* process at most the entire ring and then wait for another int */
+ while (1) {
-+
+ rxdesc = &sp->rx_ring[idx];
+ status = rxdesc->status;
++
+ if (status & DMA_RX_OWN) {
+ /* SiByte owns descriptor or descr not yet filled in */
+ rval = 0;
@@ -858,7 +855,6 @@
+ /* alloc new buffer. */
+ skb_new = netdev_alloc_skb_ip_align(dev, AR2313_BUFSIZE);
+ if (skb_new != NULL) {
-+
+ skb = sp->rx_skb[idx];
+ /* set skb */
+ skb_put(skb,
@@ -953,9 +949,8 @@
+ struct net_device *dev = (struct net_device *) data;
+ struct ar231x_private *sp = netdev_priv(dev);
+
-+ if (sp->unloading) {
++ if (sp->unloading)
+ return;
-+ }
+
+ if (ar231x_rx_int(dev)) {
+ tasklet_hi_schedule(&sp->rx_tasklet);
@@ -1005,9 +1000,9 @@
+ }
+
+ /* abnormal status */
-+ if (status & (DMA_STATUS_FBE | DMA_STATUS_TPS)) {
++ if (status & (DMA_STATUS_FBE | DMA_STATUS_TPS))
+ ar231x_restart(dev);
-+ }
++
+ return IRQ_HANDLED;
+}
+
@@ -1156,7 +1151,6 @@
+ int ret;
+
+ switch (cmd) {
-+
+ case SIOCETHTOOL:
+ spin_lock_irq(&sp->lock);
+ ret = phy_ethtool_ioctl(sp->phy_dev, (void *) ifr->ifr_data);
diff --git a/target/linux/atheros/patches-3.10/130-watchdog.patch b/target/linux/atheros/patches-3.10/130-watchdog.patch
index 506b5f9561..97b79b9a1d 100644
--- a/target/linux/atheros/patches-3.10/130-watchdog.patch
+++ b/target/linux/atheros/patches-3.10/130-watchdog.patch
@@ -1,6 +1,6 @@
--- /dev/null
+++ b/drivers/watchdog/ar2315-wtd.c
-@@ -0,0 +1,200 @@
+@@ -0,0 +1,197 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
@@ -82,8 +82,7 @@
+static irqreturn_t
+ar2315_wdt_interrupt(int irq, void *dev_id)
+{
-+ if(started)
-+ {
++ if (started) {
+ printk(KERN_CRIT "watchdog expired, rebooting system\n");
+ emergency_restart();
+ } else {
@@ -105,8 +104,7 @@
+ int new_wdt_timeout;
+ int ret = -ENOIOCTLCMD;
+
-+ switch(cmd)
-+ {
++ switch (cmd) {
+ case WDIOC_GETSUPPORT:
+ ret = copy_to_user((struct watchdog_info __user *)arg, &ident, sizeof(ident)) ? -EFAULT : 0;
+ break;
@@ -153,8 +151,7 @@
+
+ ar2315_wdt_enable();
+ ret = request_irq(AR531X_MISC_IRQ_WATCHDOG, ar2315_wdt_interrupt, IRQF_DISABLED, "ar2315_wdt", NULL);
-+ if(ret)
-+ {
++ if (ret) {
+ printk(KERN_ERR "ar2315wdt: failed to register inetrrupt\n");
+ goto out;
+ }
diff --git a/target/linux/atheros/patches-3.10/140-redboot_boardconfig.patch b/target/linux/atheros/patches-3.10/140-redboot_boardconfig.patch
index 4191b0d426..3925b677c3 100644
--- a/target/linux/atheros/patches-3.10/140-redboot_boardconfig.patch
+++ b/target/linux/atheros/patches-3.10/140-redboot_boardconfig.patch
@@ -43,12 +43,11 @@
parts[i].size = fl->img->size;
parts[i].offset = fl->img->flash_base;
parts[i].name = names;
-@@ -284,6 +289,14 @@ static int parse_redboot_partitions(stru
+@@ -284,6 +289,13 @@ static int parse_redboot_partitions(stru
fl = fl->next;
kfree(tmp_fl);
}
-+ if(master->size - max_offset >= master->erasesize)
-+ {
++ if (master->size - max_offset >= master->erasesize) {
+ parts[nrparts].size = master->size - max_offset;
+ parts[nrparts].offset = max_offset;
+ parts[nrparts].name = names;
diff --git a/target/linux/atheros/patches-3.10/142-redboot_various_erase_size_fix.patch b/target/linux/atheros/patches-3.10/142-redboot_various_erase_size_fix.patch
index fa00dcd3b4..d901b08ffe 100644
--- a/target/linux/atheros/patches-3.10/142-redboot_various_erase_size_fix.patch
+++ b/target/linux/atheros/patches-3.10/142-redboot_various_erase_size_fix.patch
@@ -63,10 +63,10 @@
fl = fl->next;
kfree(tmp_fl);
}
-- if(master->size - max_offset >= master->erasesize)
+- if (master->size - max_offset >= master->erasesize) {
+
+ if (master->size - max_offset >=
-+ mtd_get_offset_erasesize(master, max_offset))
- {
++ mtd_get_offset_erasesize(master, max_offset)) {
parts[nrparts].size = master->size - max_offset;
parts[nrparts].offset = max_offset;
+ parts[nrparts].name = names;
diff --git a/target/linux/atheros/patches-3.10/220-enet_micrel_workaround.patch b/target/linux/atheros/patches-3.10/220-enet_micrel_workaround.patch
index 58cccd0e32..d7a4d4ad61 100644
--- a/target/linux/atheros/patches-3.10/220-enet_micrel_workaround.patch
+++ b/target/linux/atheros/patches-3.10/220-enet_micrel_workaround.patch
@@ -78,7 +78,7 @@
kfree(dev);
return 0;
}
-@@ -1120,6 +1166,9 @@ static int ar231x_ioctl(struct net_devic
+@@ -1115,6 +1161,9 @@ static int ar231x_ioctl(struct net_devic
struct ar231x_private *sp = netdev_priv(dev);
int ret;
@@ -86,5 +86,5 @@
+ return -ENODEV;
+
switch (cmd) {
-
case SIOCETHTOOL:
+ spin_lock_irq(&sp->lock);
diff --git a/target/linux/atheros/patches-3.10/230-3_10-updates.patch b/target/linux/atheros/patches-3.10/230-3_10-updates.patch
index 80d7eaa395..2a5adf0cf6 100644
--- a/target/linux/atheros/patches-3.10/230-3_10-updates.patch
+++ b/target/linux/atheros/patches-3.10/230-3_10-updates.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/ethernet/ar231x/ar231x.c
+++ b/drivers/net/ethernet/ar231x/ar231x.c
-@@ -1283,7 +1283,7 @@ static int ar231x_mdiobus_probe (struct
+@@ -1277,7 +1277,7 @@ static int ar231x_mdiobus_probe (struct
BUG_ON(!phydev);
BUG_ON(phydev->attached_dev);