]> git.neil.brown.name Git - history.git/commitdiff
[ARM PATCH] 2261/1: Cleanup use of ixp_reg_write in arch/arm/mach-ixp2000
authorDeepak Saxena <dsaxena@net.rmk.(none)>
Fri, 26 Nov 2004 20:52:31 +0000 (20:52 +0000)
committerRussell King <rmk@flint.arm.linux.org.uk>
Fri, 26 Nov 2004 20:52:31 +0000 (20:52 +0000)
Patch from Lennert Buytenhek

Several files in this directory directly dereference pointers
to on-chip I/O instead of using ixp_reg_write, making them
susceptible to IXP2400 erratum #66. This changset fixes those.
We do not touch any files that will only be built for IXP2800
systems as the 2800 does not have this issue.

Signed-off-by: Lennert Buytenhek
Signed-off-by: Deepak Saxena
Signed-off-by: Russell King
arch/arm/mach-ixp2000/core.c
arch/arm/mach-ixp2000/ixdp2x01.c
arch/arm/mach-ixp2000/pci.c

index 2a13e0f28405d1ad766214d6433ac79c3f26765c..0b59703081fcd67d2e91b647d902d7e4b8b29808 100644 (file)
@@ -374,7 +374,7 @@ void __init ixp2000_init_irq(void)
        /*
         * Enable PCI irq
         */
-       *(IXP2000_IRQ_ENABLE_SET) = (1 << IRQ_IXP2000_PCI);
+       ixp2000_reg_write(IXP2000_IRQ_ENABLE_SET, (1 << IRQ_IXP2000_PCI));
        for (irq = IRQ_IXP2000_PCIA; irq <= IRQ_IXP2000_PCIB; irq++) {
                set_irq_chip(irq, &ixp2000_pci_irq_chip);
                set_irq_handler(irq, do_level_IRQ);
index 4a7a02682aa4e446b5c394caf2928ba3c202f4ee..0e919bbf9d92a7aa67e25798cda7fca9d142ea1d 100644 (file)
  *************************************************************************/
 static void ixdp2x01_irq_mask(unsigned int irq)
 {
-       *IXDP2X01_INT_MASK_SET_REG = IXP2000_BOARD_IRQ_MASK(irq);
+       ixp2000_reg_write(IXDP2X01_INT_MASK_SET_REG,
+                               IXP2000_BOARD_IRQ_MASK(irq));
 }
 
 static void ixdp2x01_irq_unmask(unsigned int irq)
 {
-       *IXDP2X01_INT_MASK_CLR_REG = IXP2000_BOARD_IRQ_MASK(irq);
+       ixp2000_reg_write(IXDP2X01_INT_MASK_CLR_REG,
+                               IXP2000_BOARD_IRQ_MASK(irq));
 }
 
 static u32 valid_irq_mask;
@@ -111,8 +113,8 @@ void __init ixdp2x01_init_irq(void)
                valid_irq_mask = IXDP2801_VALID_IRQ_MASK;
 
        /* Mask all interrupts from CPLD, disable simulation */
-       *IXDP2X01_INT_MASK_SET_REG = 0xffffffff;
-       *IXDP2X01_INT_SIM_REG = 0;
+       ixp2000_reg_write(IXDP2X01_INT_MASK_SET_REG, 0xffffffff);
+       ixp2000_reg_write(IXDP2X01_INT_SIM_REG, 0);
 
        for (irq = NR_IXP2000_IRQS; irq < NR_IXDP2X01_IRQS; irq++) {
                if (irq & valid_irq_mask) {
@@ -314,8 +316,8 @@ static struct flash_platform_data ixdp2x01_flash_platform_data = {
 
 static unsigned long ixdp2x01_flash_bank_setup(unsigned long ofs)
 {
-       *IXDP2X01_CPLD_FLASH_REG = 
-               ((ofs >> IXDP2X01_FLASH_WINDOW_BITS) | IXDP2X01_CPLD_FLASH_INTERN);
+       ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG,
+               ((ofs >> IXDP2X01_FLASH_WINDOW_BITS) | IXDP2X01_CPLD_FLASH_INTERN));
        return (ofs & IXDP2X01_FLASH_WINDOW_MASK);
 }
 
@@ -361,8 +363,8 @@ static struct platform_device *ixdp2x01_devices[] __initdata = {
 
 static void __init ixdp2x01_init_machine(void)
 {
-       *IXDP2X01_CPLD_FLASH_REG = 
-               (IXDP2X01_CPLD_FLASH_BANK_MASK | IXDP2X01_CPLD_FLASH_INTERN);
+       ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG,
+               (IXDP2X01_CPLD_FLASH_BANK_MASK | IXDP2X01_CPLD_FLASH_INTERN));
        
        ixdp2x01_flash_data.nr_banks =
                ((*IXDP2X01_CPLD_FLASH_REG & IXDP2X01_CPLD_FLASH_BANK_MASK) + 1);
index d08cebe0051752e9a148b73d8c26d773716560b7..7e6c588dbfbf6200425977b2a1bfd543be9b1965 100644 (file)
@@ -148,13 +148,13 @@ int ixp2000_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_re
        cli();
        temp = *(IXP2000_PCI_CONTROL);
        if (temp & ((1 << 8) | (1 << 5))) {
-               *(IXP2000_PCI_CONTROL) = temp;
+               ixp2000_reg_write(IXP2000_PCI_CONTROL, temp);
        }
 
        temp = *(IXP2000_PCI_CMDSTAT);
        if (temp & (1 << 29)) {
                while (temp & (1 << 29)) {      
-                       *(IXP2000_PCI_CMDSTAT) = temp;
+                       ixp2000_reg_write(IXP2000_PCI_CMDSTAT, temp);
                        temp = *(IXP2000_PCI_CMDSTAT);
                }
        }
@@ -178,13 +178,13 @@ clear_master_aborts(void)
        cli();
        temp = *(IXP2000_PCI_CONTROL);
        if (temp & ((1 << 8) | (1 << 5))) {     
-               *(IXP2000_PCI_CONTROL) = temp;
+               ixp2000_reg_write(IXP2000_PCI_CONTROL, temp);
        }
 
        temp = *(IXP2000_PCI_CMDSTAT);
        if (temp & (1 << 29)) {
                while (temp & (1 << 29)) {
-                       *(IXP2000_PCI_CMDSTAT) = temp;
+                       ixp2000_reg_write(IXP2000_PCI_CMDSTAT, temp);
                        temp = *(IXP2000_PCI_CMDSTAT);
                }
        }