summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-09-06 19:35:08 +0000
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-09-06 19:35:08 +0000
commit4aac3b42a23c57e7e4076ee7805432995025a278 (patch)
tree66e66194ab2d23f789cf674b60a561fbccefc379
parenta8c9d0167eff9272df3a03b9a149dd386fe2f677 (diff)
cosmetic fixes for ar7: indent, use lowercase hex notation, format
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8656 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/ar7/files/arch/mips/ar7/clock.c4
-rw-r--r--target/linux/ar7/files/arch/mips/ar7/platform.c60
-rw-r--r--target/linux/ar7/files/arch/mips/ar7/prom.c45
-rw-r--r--target/linux/ar7/files/arch/mips/ar7/setup.c2
-rw-r--r--target/linux/ar7/files/arch/mips/ar7/vlynq-pci.c2
-rw-r--r--target/linux/ar7/files/arch/mips/ar7/vlynq.c20
-rw-r--r--target/linux/ar7/files/drivers/char/watchdog/ar7_wdt.c74
-rw-r--r--target/linux/ar7/files/drivers/net/cpmac.c76
-rw-r--r--target/linux/ar7/files/include/asm-mips/ar7/ar7.h20
-rw-r--r--target/linux/ar7/image/Makefile24
10 files changed, 164 insertions, 163 deletions
diff --git a/target/linux/ar7/files/arch/mips/ar7/clock.c b/target/linux/ar7/files/arch/mips/ar7/clock.c
index 9bdc8f4076..56ade75acf 100644
--- a/target/linux/ar7/files/arch/mips/ar7/clock.c
+++ b/target/linux/ar7/files/arch/mips/ar7/clock.c
@@ -339,7 +339,7 @@ static int tnetd7200_get_clock_base(int clock_id, u32 *bootcr)
return AR7_AFE_CLOCK;
}
} else {
- // Sync
+ // Sync
if (*bootcr & BOOT_PLL_2TO1_MODE) {
// 2:1
switch (clock_id) {
@@ -348,7 +348,7 @@ static int tnetd7200_get_clock_base(int clock_id, u32 *bootcr)
default:
return AR7_AFE_CLOCK;
}
- } else {
+ } else {
// 1:1
return AR7_REF_CLOCK;
}
diff --git a/target/linux/ar7/files/arch/mips/ar7/platform.c b/target/linux/ar7/files/arch/mips/ar7/platform.c
index cae35bc229..b1122a6b73 100644
--- a/target/linux/ar7/files/arch/mips/ar7/platform.c
+++ b/target/linux/ar7/files/arch/mips/ar7/platform.c
@@ -98,14 +98,14 @@ static struct resource cpmac_low_res[] = {
.name = "regs",
.flags = IORESOURCE_MEM,
.start = AR7_REGS_MAC0,
- .end = AR7_REGS_MAC0 + 0x7FF,
+ .end = AR7_REGS_MAC0 + 0x7ff,
},
{
.name = "irq",
.flags = IORESOURCE_IRQ,
.start = 27,
.end = 27,
- },
+ },
};
static struct resource cpmac_high_res[] = {
@@ -113,14 +113,14 @@ static struct resource cpmac_high_res[] = {
.name = "regs",
.flags = IORESOURCE_MEM,
.start = AR7_REGS_MAC1,
- .end = AR7_REGS_MAC1 + 0x7FF,
+ .end = AR7_REGS_MAC1 + 0x7ff,
},
{
.name = "irq",
.flags = IORESOURCE_IRQ,
.start = 41,
.end = 41,
- },
+ },
};
static struct resource vlynq_low_res[] = {
@@ -135,7 +135,7 @@ static struct resource vlynq_low_res[] = {
.flags = IORESOURCE_IRQ,
.start = 29,
.end = 29,
- },
+ },
{
.name = "mem",
.flags = IORESOURCE_MEM,
@@ -155,14 +155,14 @@ static struct resource vlynq_high_res[] = {
.name = "regs",
.flags = IORESOURCE_MEM,
.start = AR7_REGS_VLYNQ1,
- .end = AR7_REGS_VLYNQ1 + 0xFF,
+ .end = AR7_REGS_VLYNQ1 + 0xff,
},
{
.name = "irq",
.flags = IORESOURCE_IRQ,
.start = 33,
.end = 33,
- },
+ },
{
.name = "mem",
.flags = IORESOURCE_MEM,
@@ -272,13 +272,13 @@ static struct plat_serial8250_port uart1_data =
};
static struct plat_serial8250_port uart_data[] = {
- uart0_data,
- uart1_data,
+ uart0_data,
+ uart1_data,
{ .flags = 0 }
};
static struct plat_serial8250_port uart_data_single[] = {
- uart0_data,
+ uart0_data,
{ .flags = 0 }
};
@@ -346,35 +346,35 @@ static int __init ar7_register_devices(void)
return res;
- // Only TNETD73xx have a second serial port
- if (ar7_has_second_uart()) {
- uart_port[1].type = PORT_AR7;
- uart_port[1].line = 1;
- uart_port[1].irq = AR7_IRQ_UART1;
- uart_port[1].uartclk = ar7_bus_freq() / 2;
- uart_port[1].iotype = UPIO_MEM;
- uart_port[1].mapbase = UR8_REGS_UART1;
- uart_port[1].membase = ioremap(uart_port[1].mapbase, 256);
- uart_port[1].regshift = 2;
- res = early_serial_setup(&uart_port[1]);
- if (res)
- return res;
- }
-
+ // Only TNETD73xx have a second serial port
+ if (ar7_has_second_uart()) {
+ uart_port[1].type = PORT_AR7;
+ uart_port[1].line = 1;
+ uart_port[1].irq = AR7_IRQ_UART1;
+ uart_port[1].uartclk = ar7_bus_freq() / 2;
+ uart_port[1].iotype = UPIO_MEM;
+ uart_port[1].mapbase = UR8_REGS_UART1;
+ uart_port[1].membase = ioremap(uart_port[1].mapbase, 256);
+ uart_port[1].regshift = 2;
+ res = early_serial_setup(&uart_port[1]);
+ if (res)
+ return res;
+ }
+
#else // !CONFIG_SERIAL_8250
uart_data[0].uartclk = ar7_bus_freq() / 2;
uart_data[1].uartclk = uart_data[0].uartclk;
- // Only TNETD73xx have a second serial port
- if (ar7_has_second_uart()) {
- uart.dev.platform_data = uart_data;
- }
+ // Only TNETD73xx have a second serial port
+ if (ar7_has_second_uart()) {
+ uart.dev.platform_data = uart_data;
+ }
res = platform_device_register(&uart);
if (res)
return res;
-
+
#endif // CONFIG_SERIAL_8250
res = platform_device_register(&physmap_flash);
diff --git a/target/linux/ar7/files/arch/mips/ar7/prom.c b/target/linux/ar7/files/arch/mips/ar7/prom.c
index 28397427d0..e06cd32a43 100644
--- a/target/linux/ar7/files/arch/mips/ar7/prom.c
+++ b/target/linux/ar7/files/arch/mips/ar7/prom.c
@@ -225,11 +225,10 @@ static void __init console_config(void)
return;
#ifdef CONFIG_KGDB
- if (!strstr(prom_getcmdline(), "nokgdb"))
- {
- strcat(prom_getcmdline(), " console=kgdb");
- kgdb_enabled = 1;
- return;
+ if (!strstr(prom_getcmdline(), "nokgdb")) {
+ strcat(prom_getcmdline(), " console=kgdb");
+ kgdb_enabled = 1;
+ return;
}
#endif
@@ -293,23 +292,23 @@ int prom_putchar(char c)
// from adm5120/prom.c
void prom_printf(char *fmt, ...)
{
- va_list args;
- int l;
- char *p, *buf_end;
- char buf[1024];
-
- va_start(args, fmt);
- l = vsprintf(buf, fmt, args); /* hopefully i < sizeof(buf) */
- va_end(args);
-
- buf_end = buf + l;
-
- for (p = buf; p < buf_end; p++) {
- /* Crude cr/nl handling is better than none */
- if (*p == '\n')
- prom_putchar('\r');
- prom_putchar(*p);
- }
+ va_list args;
+ int l;
+ char *p, *buf_end;
+ char buf[1024];
+
+ va_start(args, fmt);
+ l = vsprintf(buf, fmt, args); /* hopefully i < sizeof(buf) */
+ va_end(args);
+
+ buf_end = buf + l;
+
+ for (p = buf; p < buf_end; p++) {
+ /* Crude cr/nl handling is better than none */
+ if (*p == '\n')
+ prom_putchar('\r');
+ prom_putchar(*p);
+ }
}
#ifdef CONFIG_KGDB
@@ -320,7 +319,7 @@ int putDebugChar(char c)
char getDebugChar(void)
{
- return prom_getchar();
+ return prom_getchar();
}
#endif
diff --git a/target/linux/ar7/files/arch/mips/ar7/setup.c b/target/linux/ar7/files/arch/mips/ar7/setup.c
index 4abc39f1df..b3bd56e2ec 100644
--- a/target/linux/ar7/files/arch/mips/ar7/setup.c
+++ b/target/linux/ar7/files/arch/mips/ar7/setup.c
@@ -61,7 +61,7 @@ static void ar7_machine_halt(void)
static void ar7_machine_power_off(void)
{
- volatile u32 *power_reg = (u32 *)ioremap(AR7_REGS_POWER, 1);
+ volatile u32 *power_reg = (u32 *)ioremap(AR7_REGS_POWER, 1);
u32 power_state = *power_reg | (3 << 30);
*power_reg = power_state;
ar7_machine_halt();
diff --git a/target/linux/ar7/files/arch/mips/ar7/vlynq-pci.c b/target/linux/ar7/files/arch/mips/ar7/vlynq-pci.c
index eb11a3b002..44a68a4d1e 100644
--- a/target/linux/ar7/files/arch/mips/ar7/vlynq-pci.c
+++ b/target/linux/ar7/files/arch/mips/ar7/vlynq-pci.c
@@ -394,7 +394,7 @@ int pcibios_map_irq(struct pci_dev *pdev, u8 slot, u8 pin)
return vlynq_virq_to_irq(dev, priv->config->irq);
}
-
+
/* Do platform specific device initialization at pci_enable_device() time */
int pcibios_plat_dev_init(struct pci_dev *dev)
{
diff --git a/target/linux/ar7/files/arch/mips/ar7/vlynq.c b/target/linux/ar7/files/arch/mips/ar7/vlynq.c
index c9be214721..e4c03e28ec 100644
--- a/target/linux/ar7/files/arch/mips/ar7/vlynq.c
+++ b/target/linux/ar7/files/arch/mips/ar7/vlynq.c
@@ -39,10 +39,10 @@
#define VLYNQ_CTRL_PM_ENABLE 0x80000000
#define VLYNQ_CTRL_CLOCK_INT 0x00008000
-#define VLYNQ_CTRL_CLOCK_DIV(x) ((x & 7) << 16)
+#define VLYNQ_CTRL_CLOCK_DIV(x) (((x) & 7) << 16)
#define VLYNQ_CTRL_INT_LOCAL 0x00004000
#define VLYNQ_CTRL_INT_ENABLE 0x00002000
-#define VLYNQ_CTRL_INT_VECTOR(x) ((x & 0x1f) << 8)
+#define VLYNQ_CTRL_INT_VECTOR(x) (((x) & 0x1f) << 8)
#define VLYNQ_CTRL_INT2CFG 0x00000080
#define VLYNQ_CTRL_RESET 0x00000001
@@ -197,11 +197,11 @@ static irqreturn_t vlynq_irq(int irq, void *dev_id)
}
static struct irq_chip vlynq_irq_chip = {
- .typename = "VLYNQ",
- .name = "vlynq",
- .unmask = vlynq_irq_unmask,
- .mask = vlynq_irq_mask,
- .set_type = vlynq_irq_type,
+ .typename = "VLYNQ",
+ .name = "vlynq",
+ .unmask = vlynq_irq_unmask,
+ .mask = vlynq_irq_mask,
+ .set_type = vlynq_irq_type,
};
static int vlynq_setup_irq(struct vlynq_device *dev)
@@ -452,14 +452,14 @@ static int vlynq_probe(struct platform_device *pdev)
if (!request_mem_region(regs_res->start, len, dev->dev.bus_id)) {
printk("%s: Can't request vlynq registers\n", dev->dev.bus_id);
result = -ENXIO;
- goto fail_request;
+ goto fail_request;
}
dev->local = ioremap_nocache(regs_res->start, len);
- if (!dev->local) {
+ if (!dev->local) {
printk("%s: Can't remap vlynq registers\n", dev->dev.bus_id);
result = -ENXIO;
- goto fail_remap;
+ goto fail_remap;
}
dev->remote = (struct vlynq_regs *)((u32)dev->local + 128);
diff --git a/target/linux/ar7/files/drivers/char/watchdog/ar7_wdt.c b/target/linux/ar7/files/drivers/char/watchdog/ar7_wdt.c
index 50dfb5ef3c..2710250086 100644
--- a/target/linux/ar7/files/drivers/char/watchdog/ar7_wdt.c
+++ b/target/linux/ar7/files/drivers/char/watchdog/ar7_wdt.c
@@ -71,7 +71,7 @@ static struct semaphore open_semaphore;
static unsigned expect_close;
/* XXX currently fixed, allows max margin ~68.72 secs */
-#define prescale_value 0xFFFF
+#define prescale_value 0xffff
// Offset of the WDT registers
static unsigned long ar7_regs_wdt;
@@ -79,37 +79,37 @@ static unsigned long ar7_regs_wdt;
static ar7_wdt_t *ar7_wdt;
static void ar7_wdt_get_regs(void)
{
- u16 chip_id = ar7_chip_id();
- switch (chip_id)
- {
- case AR7_CHIP_7100:
- case AR7_CHIP_7200:
- ar7_regs_wdt = AR7_REGS_WDT;
- break;
- default:
- ar7_regs_wdt = UR8_REGS_WDT;
- break;
- }
+ u16 chip_id = ar7_chip_id();
+ switch (chip_id)
+ {
+ case AR7_CHIP_7100:
+ case AR7_CHIP_7200:
+ ar7_regs_wdt = AR7_REGS_WDT;
+ break;
+ default:
+ ar7_regs_wdt = UR8_REGS_WDT;
+ break;
+ }
}
-
+
static void ar7_wdt_kick(u32 value)
{
ar7_wdt->kick_lock = 0x5555;
if ((ar7_wdt->kick_lock & 3) == 1) {
- ar7_wdt->kick_lock = 0xAAAA;
+ ar7_wdt->kick_lock = 0xaaaa;
if ((ar7_wdt->kick_lock & 3) == 3) {
ar7_wdt->kick = value;
return;
}
- }
- printk(KERN_ERR DRVNAME ": failed to unlock WDT kick reg\n");
+ }
+ printk(KERN_ERR DRVNAME ": failed to unlock WDT kick reg\n");
}
static void ar7_wdt_prescale(u32 value)
{
- ar7_wdt->prescale_lock = 0x5A5A;
+ ar7_wdt->prescale_lock = 0x5a5a;
if ((ar7_wdt->prescale_lock & 3) == 1) {
- ar7_wdt->prescale_lock = 0xA5A5;
+ ar7_wdt->prescale_lock = 0xa5a5;
if ((ar7_wdt->prescale_lock & 3) == 3) {
ar7_wdt->prescale = value;
return;
@@ -122,7 +122,7 @@ static void ar7_wdt_change(u32 value)
{
ar7_wdt->change_lock = 0x6666;
if ((ar7_wdt->change_lock & 3) == 1) {
- ar7_wdt->change_lock = 0xBBBB;
+ ar7_wdt->change_lock = 0xbbbb;
if ((ar7_wdt->change_lock & 3) == 3) {
ar7_wdt->change = value;
return;
@@ -135,9 +135,9 @@ static void ar7_wdt_disable(u32 value)
{
ar7_wdt->disable_lock = 0x7777;
if ((ar7_wdt->disable_lock & 3) == 1) {
- ar7_wdt->disable_lock = 0xCCCC;
+ ar7_wdt->disable_lock = 0xcccc;
if ((ar7_wdt->disable_lock & 3) == 2) {
- ar7_wdt->disable_lock = 0xDDDD;
+ ar7_wdt->disable_lock = 0xdddd;
if ((ar7_wdt->disable_lock & 3) == 3) {
ar7_wdt->disable = value;
return;
@@ -153,7 +153,7 @@ static void ar7_wdt_update_margin(int new_margin)
change = new_margin * (ar7_vbus_freq() / prescale_value);
if (change < 1) change = 1;
- if (change > 0xFFFF) change = 0xFFFF;
+ if (change > 0xffff) change = 0xffff;
ar7_wdt_change(change);
margin = change * prescale_value / ar7_vbus_freq();
printk(KERN_INFO DRVNAME
@@ -192,19 +192,19 @@ static int ar7_wdt_release(struct inode *inode, struct file *file)
} else if (!nowayout) {
ar7_wdt_disable_wdt();
}
- up(&open_semaphore);
+ up(&open_semaphore);
return 0;
}
static int ar7_wdt_notify_sys(struct notifier_block *this,
- unsigned long code, void *unused)
+ unsigned long code, void *unused)
{
if (code == SYS_HALT || code == SYS_POWER_OFF)
if (!nowayout)
ar7_wdt_disable_wdt();
- return NOTIFY_DONE;
+ return NOTIFY_DONE;
}
static struct notifier_block ar7_wdt_notifier =
@@ -213,7 +213,7 @@ static struct notifier_block ar7_wdt_notifier =
};
static ssize_t ar7_wdt_write(struct file *file, const char *data,
- size_t len, loff_t *ppos)
+ size_t len, loff_t *ppos)
{
if (ppos != &file->f_pos)
return -ESPIPE;
@@ -238,7 +238,7 @@ static ssize_t ar7_wdt_write(struct file *file, const char *data,
}
static int ar7_wdt_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
+ unsigned int cmd, unsigned long arg)
{
static struct watchdog_info ident = {
.identity = LONGNAME,
@@ -248,8 +248,6 @@ static int ar7_wdt_ioctl(struct inode *inode, struct file *file,
int new_margin;
switch (cmd) {
- default:
- return -ENOTTY;
case WDIOC_GETSUPPORT:
if(copy_to_user((struct watchdog_info *)arg, &ident,
sizeof(ident)))
@@ -276,6 +274,8 @@ static int ar7_wdt_ioctl(struct inode *inode, struct file *file,
if (put_user(margin, (int *)arg))
return -EFAULT;
return 0;
+ default:
+ return -ENOTTY;
}
}
@@ -296,8 +296,8 @@ static struct miscdevice ar7_wdt_miscdev = {
static int __init ar7_wdt_init(void)
{
int rc;
-
- ar7_wdt_get_regs();
+
+ ar7_wdt_get_regs();
if (!request_mem_region(ar7_regs_wdt, sizeof(ar7_wdt_t), LONGNAME)) {
printk(KERN_WARNING DRVNAME ": watchdog I/O region busy\n");
@@ -314,15 +314,15 @@ static int __init ar7_wdt_init(void)
rc = misc_register(&ar7_wdt_miscdev);
if (rc) {
- printk(KERN_ERR DRVNAME ": unable to register misc device\n");
+ printk(KERN_ERR DRVNAME ": unable to register misc device\n");
goto out_alloc;
}
rc = register_reboot_notifier(&ar7_wdt_notifier);
- if (rc) {
- printk(KERN_ERR DRVNAME ": unable to register reboot notifier\n");
+ if (rc) {
+ printk(KERN_ERR DRVNAME ": unable to register reboot notifier\n");
goto out_register;
- }
+ }
goto out;
out_register:
@@ -335,9 +335,9 @@ out:
static void __exit ar7_wdt_cleanup(void)
{
- unregister_reboot_notifier(&ar7_wdt_notifier);
+ unregister_reboot_notifier(&ar7_wdt_notifier);
misc_deregister(&ar7_wdt_miscdev);
- iounmap(ar7_wdt);
+ iounmap(ar7_wdt);
release_mem_region(ar7_regs_wdt, sizeof(ar7_wdt_t));
}
diff --git a/target/linux/ar7/files/drivers/net/cpmac.c b/target/linux/ar7/files/drivers/net/cpmac.c
index 7d46677080..7d8e1b8247 100644
--- a/target/linux/ar7/files/drivers/net/cpmac.c
+++ b/target/linux/ar7/files/drivers/net/cpmac.c
@@ -242,14 +242,14 @@ static void cpmac_dump_regs(u32 *base, int count)
static const char *cpmac_dump_buf(const uint8_t * buf, unsigned size)
{
- static char buffer[3 * 25 + 1];
- char *p = &buffer[0];
- if (size > 20)
- size = 20;
- while (size-- > 0) {
- p += sprintf(p, " %02x", *buf++);
- }
- return buffer;
+ static char buffer[3 * 25 + 1];
+ char *p = &buffer[0];
+ if (size > 20)
+ size = 20;
+ while (size-- > 0) {
+ p += sprintf(p, " %02x", *buf++);
+ }
+ return buffer;
}
#endif
@@ -336,7 +336,7 @@ static void cpmac_set_multicast_list(struct net_device *dev)
if(dev->flags & IFF_PROMISC) {
priv->regs->mbp &= ~MBP_PROMISCCHAN(0); /* promisc channel 0 */
priv->regs->mbp |= MBP_RXPROMISC;
- } else {
+ } else {
priv->regs->mbp &= ~MBP_RXPROMISC;
if(dev->flags & IFF_ALLMULTI) {
/* enable all multicast mode */
@@ -460,8 +460,8 @@ static void cpmac_rx(struct net_device *dev)
desc = priv->rx_head;
dma_cache_inv((u32)desc, 16);
#ifdef CPMAC_DEBUG
- printk(KERN_DEBUG "%s: len=%d, %s\n", __func__, pkt->datalen,
- cpmac_dump_buf(data, pkt->datalen));
+ printk(KERN_DEBUG "%s: len=%d, %s\n", __func__, pkt->datalen,
+ cpmac_dump_buf(data, pkt->datalen));
#endif
while ((desc->dataflags & CPMAC_OWN) == 0) {
@@ -527,13 +527,13 @@ static int cpmac_poll(struct net_device *dev, int *budget)
static void
cpmac_alloc_skbs(struct work_struct *work)
{
- struct cpmac_priv *priv = container_of(work, struct cpmac_priv,
- alloc_work);
+ struct cpmac_priv *priv = container_of(work, struct cpmac_priv,
+ alloc_work);
#else
static void
cpmac_alloc_skbs(void *data)
{
- struct net_device *dev = (struct net_device*)data;
+ struct net_device *dev = (struct net_device*)data;
struct cpmac_priv *priv = netdev_priv(dev);
#endif
unsigned long flags;
@@ -576,7 +576,7 @@ static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev)
len = skb->len;
#ifdef CPMAC_DEBUG
- printk(KERN_DEBUG "%s: len=%d\n", __func__, len); //cpmac_dump_buf(const uint8_t * buf, unsigned size)
+ printk(KERN_DEBUG "%s: len=%d\n", __func__, len); //cpmac_dump_buf(const uint8_t * buf, unsigned size)
#endif
if (unlikely(len < ETH_ZLEN)) {
if (unlikely(skb_padto(skb, ETH_ZLEN))) {
@@ -753,42 +753,42 @@ static int cpmac_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
static int cpmac_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
- struct cpmac_priv *priv = netdev_priv(dev);
+ struct cpmac_priv *priv = netdev_priv(dev);
- if (priv->phy)
- return phy_ethtool_gset(priv->phy, cmd);
+ if (priv->phy)
+ return phy_ethtool_gset(priv->phy, cmd);
- return -EINVAL;
+ return -EINVAL;
}
static int cpmac_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
- struct cpmac_priv *priv = netdev_priv(dev);
+ struct cpmac_priv *priv = netdev_priv(dev);
- if (!capable(CAP_NET_ADMIN))
- return -EPERM;
+ if (!capable(CAP_NET_ADMIN))
+ return -EPERM;
- if (priv->phy)
- return phy_ethtool_sset(priv->phy, cmd);
+ if (priv->phy)
+ return phy_ethtool_sset(priv->phy, cmd);
- return -EINVAL;
+ return -EINVAL;
}
static void cpmac_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
{
- strcpy(info->driver, "cpmac");
- strcpy(info->version, "0.0.3");
- info->fw_version[0] = '\0';
- sprintf(info->bus_info, "%s", "cpmac");
- info->regdump_len = 0;
+ strcpy(info->driver, "cpmac");
+ strcpy(info->version, "0.0.3");
+ info->fw_version[0] = '\0';
+ sprintf(info->bus_info, "%s", "cpmac");
+ info->regdump_len = 0;
}
static const struct ethtool_ops cpmac_ethtool_ops = {
- .get_settings = cpmac_get_settings,
- .set_settings = cpmac_set_settings,
- .get_drvinfo = cpmac_get_drvinfo,
- .get_link = ethtool_op_get_link,
+ .get_settings = cpmac_get_settings,
+ .set_settings = cpmac_set_settings,
+ .get_drvinfo = cpmac_get_drvinfo,
+ .get_link = ethtool_op_get_link,
};
static struct net_device_stats *cpmac_stats(struct net_device *dev)
@@ -806,7 +806,7 @@ static int cpmac_change_mtu(struct net_device *dev, int mtu)
unsigned long flags;
struct cpmac_priv *priv = netdev_priv(dev);
spinlock_t *lock = &priv->lock;
-
+
if ((mtu < 68) || (mtu > 1500))
return -EINVAL;
@@ -937,9 +937,9 @@ static int cpmac_open(struct net_device *dev)
priv->rx_head = &priv->desc_ring[CPMAC_TX_RING_SIZE];
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
- INIT_WORK(&priv->alloc_work, cpmac_alloc_skbs);
+ INIT_WORK(&priv->alloc_work, cpmac_alloc_skbs);
#else
- INIT_WORK(&priv->alloc_work, cpmac_alloc_skbs, dev);
+ INIT_WORK(&priv->alloc_work, cpmac_alloc_skbs, dev);
#endif
schedule_work(&priv->alloc_work);
flush_scheduled_work();
@@ -961,7 +961,7 @@ static int cpmac_open(struct net_device *dev)
}
if((res = request_irq(dev->irq, cpmac_irq, SA_INTERRUPT,
- dev->name, dev))) {
+ dev->name, dev))) {
printk("%s: failed to obtain irq\n", dev->name);
goto fail_irq;
}
diff --git a/target/linux/ar7/files/include/asm-mips/ar7/ar7.h b/target/linux/ar7/files/include/asm-mips/ar7/ar7.h
index ae1d4192bf..5ed005e8dc 100644
--- a/target/linux/ar7/files/include/asm-mips/ar7/ar7.h
+++ b/target/linux/ar7/files/include/asm-mips/ar7/ar7.h
@@ -33,9 +33,9 @@
#define AR7_REGS_UART0 (AR7_REGS_BASE + 0x0e00)
#define AR7_REGS_RESET (AR7_REGS_BASE + 0x1600)
#define AR7_REGS_VLYNQ0 (AR7_REGS_BASE + 0x1800)
-#define AR7_REGS_DCL (AR7_REGS_BASE + 0x1A00)
-#define AR7_REGS_VLYNQ1 (AR7_REGS_BASE + 0x1C00)
-#define AR7_REGS_MDIO (AR7_REGS_BASE + 0x1E00)
+#define AR7_REGS_DCL (AR7_REGS_BASE + 0x1a00)
+#define AR7_REGS_VLYNQ1 (AR7_REGS_BASE + 0x1c00)
+#define AR7_REGS_MDIO (AR7_REGS_BASE + 0x1e00)
#define AR7_REGS_IRQ (AR7_REGS_BASE + 0x2400)
#define AR7_REGS_MAC1 (AR7_REGS_BASE + 0x2800)
@@ -43,9 +43,9 @@
#define UR8_REGS_WDT (AR7_REGS_BASE + 0x0b00)
#define UR8_REGS_UART1 (AR7_REGS_BASE + 0x0f00)
-#define AR7_RESET_PEREPHERIAL 0x0
-#define AR7_RESET_SOFTWARE 0x4
-#define AR7_RESET_STATUS 0x8
+#define AR7_RESET_PEREPHERIAL 0x0
+#define AR7_RESET_SOFTWARE 0x4
+#define AR7_RESET_STATUS 0x8
#define AR7_RESET_BIT_CPMAC_LO 17
#define AR7_RESET_BIT_CPMAC_HI 21
@@ -53,10 +53,10 @@
#define AR7_RESET_BIT_EPHY 26
/* GPIO control registers */
-#define AR7_GPIO_INPUT 0x0
-#define AR7_GPIO_OUTPUT 0x4
-#define AR7_GPIO_DIR 0x8
-#define AR7_GPIO_ENABLE 0xC
+#define AR7_GPIO_INPUT 0x0
+#define AR7_GPIO_OUTPUT 0x4
+#define AR7_GPIO_DIR 0x8
+#define AR7_GPIO_ENABLE 0xc
#define AR7_CHIP_7100 0x18
#define AR7_CHIP_7200 0x2b
diff --git a/target/linux/ar7/image/Makefile b/target/linux/ar7/image/Makefile
index 27af165533..b80af35408 100644
--- a/target/linux/ar7/image/Makefile
+++ b/target/linux/ar7/image/Makefile
@@ -7,20 +7,22 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
-DROP_SECTIONS := .reginfo .mdebug .comment .note .pdr .options .MIPS.options
-OBJCOPY_SREC := $(TARGET_CROSS)objcopy -S -O srec $(addprefix --remove-section=,$(DROP_SECTIONS))
+DROP_SECTIONS:=.reginfo .mdebug .comment .note .pdr .options .MIPS.options
+OBJCOPY_SREC:=$(TARGET_CROSS)objcopy -S -O srec $(addprefix --remove-section=,$(DROP_SECTIONS))
-LOADADDR := 0x94600000
-KERNEL_ENTRY := 0x94100000
-RAMSTART := 0x94000000
-RAMSIZE := 0x00100000
+LOADADDR:=0x94600000
+KERNEL_ENTRY:=0x94100000
+RAMSTART:=0x94000000
+RAMSIZE:=0x00100000
+
+EVA_LOADADDR := 0x94100000
LOADER_MAKEOPTS= \
- KDIR=$(KDIR) \
- LOADADDR=$(LOADADDR) \
- KERNEL_ENTRY=$(KERNEL_ENTRY) \
- RAMSTART=$(RAMSTART) \
- RAMSIZE=$(RAMSIZE)
+ KDIR=$(KDIR) \
+ LOADADDR=$(LOADADDR) \
+ KERNEL_ENTRY=$(KERNEL_ENTRY) \
+ RAMSTART=$(RAMSTART) \
+ RAMSIZE=$(RAMSIZE)
CFLAGS := -D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -Os \
-fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic \