1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

amazon: update amazon target to kernel 3.3

This is just compile tested, my device is currently not working.


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31706 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
hauke
2012-05-13 15:10:40 +00:00
parent 4e0a145cae
commit c8c0045b91
18 changed files with 71 additions and 78 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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

View File

@@ -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;

View File

@@ -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);