summaryrefslogtreecommitdiffstats
path: root/target/linux/amazon/files
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/amazon/files')
-rw-r--r--target/linux/amazon/files/arch/mips/amazon/interrupt.c37
-rw-r--r--target/linux/amazon/files/drivers/mtd/maps/amazon.c4
-rw-r--r--target/linux/amazon/files/drivers/net/ethernet/admmod.c (renamed from target/linux/amazon/files/drivers/net/admmod.c)1
-rw-r--r--target/linux/amazon/files/drivers/net/ethernet/amazon_sw.c (renamed from target/linux/amazon/files/drivers/net/amazon_sw.c)2
-rw-r--r--target/linux/amazon/files/drivers/tty/serial/amazon_asc.c (renamed from target/linux/amazon/files/drivers/serial/amazon_asc.c)0
-rw-r--r--target/linux/amazon/files/drivers/watchdog/amazon_wdt.c2
6 files changed, 20 insertions, 26 deletions
diff --git a/target/linux/amazon/files/arch/mips/amazon/interrupt.c b/target/linux/amazon/files/arch/mips/amazon/interrupt.c
index e264ca759..05ff1ee75 100644
--- a/target/linux/amazon/files/arch/mips/amazon/interrupt.c
+++ b/target/linux/amazon/files/arch/mips/amazon/interrupt.c
@@ -34,10 +34,11 @@
#include <asm/irq.h>
#include <asm/time.h>
-static void amazon_disable_irq(unsigned int irq_nr)
+static void amazon_disable_irq(struct irq_data *d)
{
int i;
u32 amazon_ier = AMAZON_ICU_IM0_IER;
+ unsigned int irq_nr = d->irq;
if (irq_nr <= INT_NUM_IM0_IRL11 && irq_nr >= INT_NUM_IM0_IRL0)
amazon_writel(amazon_readl(amazon_ier) & (~(AMAZON_DMA_H_MASK)), amazon_ier);
@@ -53,11 +54,12 @@ static void amazon_disable_irq(unsigned int irq_nr)
}
}
-static void amazon_mask_and_ack_irq(unsigned int irq_nr)
+static void amazon_mask_and_ack_irq(struct irq_data *d)
{
int i;
u32 amazon_ier = AMAZON_ICU_IM0_IER;
u32 amazon_isr = AMAZON_ICU_IM0_ISR;
+ unsigned int irq_nr = d->irq;
if (irq_nr <= INT_NUM_IM0_IRL11 && irq_nr >= INT_NUM_IM0_IRL0){
amazon_writel(amazon_readl(amazon_ier) & (~(AMAZON_DMA_H_MASK)), amazon_ier);
@@ -77,10 +79,11 @@ static void amazon_mask_and_ack_irq(unsigned int irq_nr)
}
}
-static void amazon_enable_irq(unsigned int irq_nr)
+static void amazon_enable_irq(struct irq_data *d)
{
int i;
u32 amazon_ier = AMAZON_ICU_IM0_IER;
+ unsigned int irq_nr = d->irq;
if (irq_nr <= INT_NUM_IM0_IRL11 && irq_nr >= INT_NUM_IM0_IRL0)
amazon_writel(amazon_readl(amazon_ier) | AMAZON_DMA_H_MASK, amazon_ier);
@@ -96,29 +99,21 @@ static void amazon_enable_irq(unsigned int irq_nr)
}
}
-static unsigned int amazon_startup_irq(unsigned int irq)
+static unsigned int amazon_startup_irq(struct irq_data *d)
{
- amazon_enable_irq(irq);
+ amazon_enable_irq(d);
return 0;
}
-static void amazon_end_irq(unsigned int irq)
-{
- if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) {
- amazon_enable_irq(irq);
- }
-}
-
static struct irq_chip amazon_irq_type = {
.name = "AMAZON",
- .startup = amazon_startup_irq,
- .enable = amazon_enable_irq,
- .disable = amazon_disable_irq,
- .unmask = amazon_enable_irq,
- .ack = amazon_mask_and_ack_irq,
- .mask = amazon_disable_irq,
- .mask_ack = amazon_mask_and_ack_irq,
- .end = amazon_end_irq
+ .irq_startup = amazon_startup_irq,
+ .irq_enable = amazon_enable_irq,
+ .irq_disable = amazon_disable_irq,
+ .irq_unmask = amazon_enable_irq,
+ .irq_ack = amazon_mask_and_ack_irq,
+ .irq_mask = amazon_disable_irq,
+ .irq_mask_ack = amazon_mask_and_ack_irq,
};
/* Cascaded interrupts from IM0-4 */
@@ -178,7 +173,7 @@ void __init arch_init_irq(void)
}
for (i = INT_NUM_IRQ0; i <= INT_NUM_IM4_IRL31; i++)
- set_irq_chip_and_handler(i, &amazon_irq_type,
+ irq_set_chip_and_handler(i, &amazon_irq_type,
handle_level_irq);
set_c0_status(IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4 | IE_IRQ5);
diff --git a/target/linux/amazon/files/drivers/mtd/maps/amazon.c b/target/linux/amazon/files/drivers/mtd/maps/amazon.c
index 55bfe3237..568f7d828 100644
--- a/target/linux/amazon/files/drivers/mtd/maps/amazon.c
+++ b/target/linux/amazon/files/drivers/mtd/maps/amazon.c
@@ -118,7 +118,7 @@ int find_uImage_size(unsigned long start_offset)
return temp + 0x40;
}
-static int __init amazon_mtd_probe(struct platform_device *dev)
+static int amazon_mtd_probe(struct platform_device *dev)
{
unsigned long uimage_size;
struct mtd_info *mymtd = NULL;
@@ -167,7 +167,7 @@ static int __init amazon_mtd_probe(struct platform_device *dev)
amazon_partitions[2].size = mymtd->size - amazon_partitions[2].offset - (2 * mymtd->erasesize);
}
- add_mtd_partitions(mymtd, parts, 3);
+ mtd_device_register(mymtd, parts, 3);
printk(KERN_INFO "amazon_mtd: added %s flash with %dMB\n",
amazon_map.name, ((int)mymtd->size) >> 20);
diff --git a/target/linux/amazon/files/drivers/net/admmod.c b/target/linux/amazon/files/drivers/net/ethernet/admmod.c
index 473a1f638..a11ee1d39 100644
--- a/target/linux/amazon/files/drivers/net/admmod.c
+++ b/target/linux/amazon/files/drivers/net/ethernet/admmod.c
@@ -1245,7 +1245,6 @@ int adm_process_protocol_filter_request (unsigned int cmd, PPROTOCOLFILTER uPROT
int adm_process_mac_table_request (unsigned int cmd, PMACENTRY mMACENTRY)
{
- unsigned int rtval;
unsigned int val; //6996i
unsigned int control[6] ; //6996i
unsigned int status[6] ; //6996i
diff --git a/target/linux/amazon/files/drivers/net/amazon_sw.c b/target/linux/amazon/files/drivers/net/ethernet/amazon_sw.c
index 54a70622e..d18b439ce 100644
--- a/target/linux/amazon/files/drivers/net/amazon_sw.c
+++ b/target/linux/amazon/files/drivers/net/ethernet/amazon_sw.c
@@ -98,7 +98,7 @@
#define ETHERNET_PACKET_DMA_BUFFER_SIZE 1536
/***************************************** Module Parameters *************************************/
-char mode[] = "bridge";
+static char mode[] = "bridge";
module_param_array(mode, charp, NULL, 0);
static int timeout = 1 * HZ;
diff --git a/target/linux/amazon/files/drivers/serial/amazon_asc.c b/target/linux/amazon/files/drivers/tty/serial/amazon_asc.c
index 449208616..449208616 100644
--- a/target/linux/amazon/files/drivers/serial/amazon_asc.c
+++ b/target/linux/amazon/files/drivers/tty/serial/amazon_asc.c
diff --git a/target/linux/amazon/files/drivers/watchdog/amazon_wdt.c b/target/linux/amazon/files/drivers/watchdog/amazon_wdt.c
index 89f1e2281..b18296b79 100644
--- a/target/linux/amazon/files/drivers/watchdog/amazon_wdt.c
+++ b/target/linux/amazon/files/drivers/watchdog/amazon_wdt.c
@@ -215,7 +215,7 @@ static struct file_operations wdt_fops = {
release: wdt_release,
};
-static int __init amazon_wdt_probe(struct platform_device *dev)
+static int amazon_wdt_probe(struct platform_device *dev)
{
int result = result = register_chrdev(0, "watchdog", &wdt_fops);