diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-18 22:31:05 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-18 22:31:05 -0700 |
commit | 2c1d2470c0c0992fae2cc0e04921f9e02a670a00 (patch) | |
tree | 7401f45d206c4173c34dc3b0ecce839e06da2c71 /arch/mn10300/unit-asb2364/unit-init.c | |
parent | 664322a4475236bd9900f2853a9b981a4377493f (diff) | |
parent | ddb7d1e975d224885397c002512ded987be3c3bc (diff) | |
download | kernel_samsung_smdk4412-2c1d2470c0c0992fae2cc0e04921f9e02a670a00.zip kernel_samsung_smdk4412-2c1d2470c0c0992fae2cc0e04921f9e02a670a00.tar.gz kernel_samsung_smdk4412-2c1d2470c0c0992fae2cc0e04921f9e02a670a00.tar.bz2 |
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-mn10300
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-mn10300:
MN10300: Clear ASB2364 peripheral interrupt masks before enabling interrupts
MN10300: Fix the ASB2364 gdbport UART register defs
MN10300: Fix ASB2364 FPGA register defs
MN10300: Select GENERIC_HARDIRQS_NO_DEPRECATED
MN10300: Select HAVE_GENERIC_HARDIRQS rather than GENERIC_HARDIRQS
MN10300: Convert ASB2364 FPGA irq_chip to new functions
MN10300: Convert ipi irq_chip to new functions
MN10300: Convert serial irq_chip to new functions
MN10300: Convert cpu irq_chips to new functions
MN10300: Remove unused mn10300_intc_* functions
MN10300: Remove stale irq_chip.end - V2
MN10300: Use clockevents_calc_mult_shift()
MN10300: Use clocksource_register_hz()
MN10300: Remove stale code
Diffstat (limited to 'arch/mn10300/unit-asb2364/unit-init.c')
-rw-r--r-- | arch/mn10300/unit-asb2364/unit-init.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/arch/mn10300/unit-asb2364/unit-init.c b/arch/mn10300/unit-asb2364/unit-init.c index 1144080..6359b41 100644 --- a/arch/mn10300/unit-asb2364/unit-init.c +++ b/arch/mn10300/unit-asb2364/unit-init.c @@ -20,13 +20,41 @@ #include <asm/processor.h> #include <asm/irq.h> #include <asm/intctl-regs.h> +#include <asm/serial-regs.h> #include <unit/fpga-regs.h> +#include <unit/serial.h> +#include <unit/smsc911x.h> + +#define TTYS0_SERIAL_IER __SYSREG(SERIAL_PORT0_BASE_ADDRESS + UART_IER * 2, u8) +#define LAN_IRQ_CFG __SYSREG(SMSC911X_BASE + 0x54, u32) +#define LAN_INT_EN __SYSREG(SMSC911X_BASE + 0x5c, u32) /* * initialise some of the unit hardware before gdbstub is set up */ asmlinkage void __init unit_init(void) { + /* Make sure we aren't going to get unexpected interrupts */ + TTYS0_SERIAL_IER = 0; + SC0RXICR = 0; + SC0TXICR = 0; + SC1RXICR = 0; + SC1TXICR = 0; + SC2RXICR = 0; + SC2TXICR = 0; + + /* Attempt to reset the FPGA attached peripherals */ + ASB2364_FPGA_REG_RESET_LAN = 0x0000; + SyncExBus(); + ASB2364_FPGA_REG_RESET_UART = 0x0000; + SyncExBus(); + ASB2364_FPGA_REG_RESET_I2C = 0x0000; + SyncExBus(); + ASB2364_FPGA_REG_RESET_USB = 0x0000; + SyncExBus(); + ASB2364_FPGA_REG_RESET_AV = 0x0000; + SyncExBus(); + /* set up the external interrupts */ /* XIRQ[0]: NAND RXBY */ @@ -56,7 +84,23 @@ asmlinkage void __init unit_init(void) */ asmlinkage void __init unit_setup(void) { + /* Release the reset on the SMSC911X so that it is ready by the time we + * need it */ + ASB2364_FPGA_REG_RESET_LAN = 0x0001; + SyncExBus(); + ASB2364_FPGA_REG_RESET_UART = 0x0001; + SyncExBus(); + ASB2364_FPGA_REG_RESET_I2C = 0x0001; + SyncExBus(); + ASB2364_FPGA_REG_RESET_USB = 0x0001; + SyncExBus(); + ASB2364_FPGA_REG_RESET_AV = 0x0001; + SyncExBus(); + /* Make sure the ethernet chipset isn't going to give us an interrupt + * storm from stuff it was doing pre-reset */ + LAN_IRQ_CFG = 0; + LAN_INT_EN = 0; } /* |