lkml: add driver for enc424j600 ethernet chip on SPI bus

These patches add support for Microchip enc424j600 ethernet chip
controlled via SPI.

I tested it on my custom board with ARM9 (Freescale i.MX233) with
Kernel 2.6.31.14.
Any comments are welcome.

Signed-off-by: Balaji Venkatachalam <balaji.v@thotakaa.com>

Moved to correct location in the tree and made it compile.

I need something to kexec with until I get USB working...

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
dwc2xx_hcd: Add Synopsys Designware 2.xx HCD driver

This can detect the device and register an IRQ handler.

[   15.389078] calling  dwc2xx_hcd_driver_init+0x0/0xc @ 1
[   15.394605] bus: 'platform': add driver dwc2xx-hcd
[   15.400255] bus: 'platform': driver_probe_device: matched device 20980000.usb with driver dwc2xx-hcd
[   15.409485] bus: 'platform': really_probe: probing driver dwc2xx-hcd with device 20980000.usb
[   15.423919] dwc2xx-hcd 20980000.usb: HCD v2.80a at MMIO 0x20980000 (irq = 33)
[   15.431186] ------------[ cut here ]------------
[   15.435829] WARNING: at drivers/usb/host/dwc2xx-hcd.h:129 dwc2xx_hcd_dump_regs+0x18/0x408()
[   15.444245] Modules linked in:
[   15.447350] [<c0013b50>] (unwind_backtrace+0x0/0xf0) from [<c001acfc>] (warn_slowpath_common+0x4c/0x64)
[   15.456826] [<c001acfc>] (warn_slowpath_common+0x4c/0x64) from [<c001ad30>] (warn_slowpath_null+0x1c/0x24)
[   15.466562] [<c001ad30>] (warn_slowpath_null+0x1c/0x24) from [<c022ac1c>] (dwc2xx_hcd_dump_regs+0x18/0x408)
[   15.476397] [<c022ac1c>] (dwc2xx_hcd_dump_regs+0x18/0x408) from [<c0223c14>] (dwc2xx_hcd_probe+0x1c4/0x244)
[   15.486230] [<c0223c14>] (dwc2xx_hcd_probe+0x1c4/0x244) from [<c013ef94>] (platform_drv_probe+0x18/0x1c)
[   15.495796] [<c013ef94>] (platform_drv_probe+0x18/0x1c) from [<c022a838>] (really_probe+0xd8/0x3e8)
[   15.504922] [<c022a838>] (really_probe+0xd8/0x3e8) from [<c013e09c>] (driver_probe_device+0x80/0x9c)
[   15.514136] [<c013e09c>] (driver_probe_device+0x80/0x9c) from [<c013e14c>] (__driver_attach+0x94/0x98)
[   15.523526] [<c013e14c>] (__driver_attach+0x94/0x98) from [<c013c858>] (bus_for_each_dev+0x50/0x7c)
[   15.532653] [<c013c858>] (bus_for_each_dev+0x50/0x7c) from [<c013d738>] (bus_add_driver+0xc0/0x270)
[   15.541778] [<c013d738>] (bus_add_driver+0xc0/0x270) from [<c013e3d4>] (driver_register+0x78/0x12c)
[   15.551066] [<c013e3d4>] (driver_register+0x78/0x12c) from [<c00086a4>] (do_one_initcall+0x110/0x178)
[   15.560392] [<c00086a4>] (do_one_initcall+0x110/0x178) from [<c02eb864>] (do_basic_setup+0x90/0xc4)
[   15.569523] [<c02eb864>] (do_basic_setup+0x90/0xc4) from [<c02eb8f0>] (kernel_init+0x58/0xec)
[   15.578075] [<c02eb8f0>] (kernel_init+0x58/0xec) from [<c000edf0>] (kernel_thread_exit+0x0/0x8)
[   15.587044] ---[ end trace 69e67d99cc220cc0 ]---
[   15.591752] dwc2xx-hcd 20980000.usb: 000 = 00010000; DWC_OTG_CTL_REG
[   15.598111] dwc2xx-hcd 20980000.usb: 004 = 00000000; DWC_OTG_INT_REG
[   15.604529] dwc2xx-hcd 20980000.usb: 008 = 00000000; DWC_CORE_AHB_CFG_REG
[   15.611384] dwc2xx-hcd 20980000.usb: 00c = 00001400; DWC_CORE_USB_CFG_REG
[   15.618176] dwc2xx-hcd 20980000.usb: 010 = 80000000; DWC_CORE_RESET_REG
[   15.624852] dwc2xx-hcd 20980000.usb: 014 = 14000020; DWC_CORE_INT_REG
[   15.631351] dwc2xx-hcd 20980000.usb: 018 = 00000000; DWC_INT_MASK_REG
[   15.637795] dwc2xx-hcd 20980000.usb: 01c = fffb7fbf; DWC_RX_STAT_PEEK_REG
[   15.644645] dwc2xx-hcd 20980000.usb: 020 = fffb7fbf; DWC_RX_STAT_POP_REG
[   15.651408] dwc2xx-hcd 20980000.usb: 024 = 00001000; DWC_RX_FIFO_SZ_REG
[   15.658028] dwc2xx-hcd 20980000.usb: 028 = 00201000; DWC_NP_TX_FIFO_SZ_REG
[   15.664961] dwc2xx-hcd 20980000.usb: 02c = 00080020; DWC_NP_TX_STAT_READ_REG
[   15.672072] dwc2xx-hcd 20980000.usb: 030 = 00000000; DWC_I2C_CTL_REG
[   15.678429] dwc2xx-hcd 20980000.usb: 034 = 00000000; DWC_PHY_VENDOR_CTRL_REG
[   15.685536] dwc2xx-hcd 20980000.usb: 038 = 00000000; DWC_GPIO_REG
[   15.691691] dwc2xx-hcd 20980000.usb: 03c = 2708a000; DWC_UID_REG
[   15.697702] dwc2xx-hcd 20980000.usb: 040 = 4f54280a; DWC_SNPS_ID_REG
[   15.704116] dwc2xx-hcd 20980000.usb: 044 = 00000000; DWC_USER_HW_CFG1_REG
[   15.710965] dwc2xx-hcd 20980000.usb: 048 = 228ddd50; DWC_USER_HW_CFG2_REG
[   15.717757] dwc2xx-hcd 20980000.usb: 04c = 0ff000e8; DWC_USER_HW_CFG3_REG
[   15.724605] dwc2xx-hcd 20980000.usb: 050 = 1ff00020; DWC_USER_HW_CFG4_REG
[   15.731452] dwc2xx-hcd 20980000.usb: 054 = 75736230; DWC_CORE_LPM_CFG_REG
[   15.738243] dwc2xx-hcd 20980000.usb: 100 = 00000000; DWC_HP_TX_FIFO_SZ_REG
[   15.745181] dwc2xx-hcd 20980000.usb: 104 = 02001020; DWC_DV_TX_FIFO_SZ_REG(0)
[   15.752503] dwc2xx-hcd 20980000.usb: 108 = 02001220; DWC_DV_TX_FIFO_SZ_REG(1)
[   15.759719] dwc2xx-hcd 20980000.usb: 10c = 02001420; DWC_DV_TX_FIFO_SZ_REG(2)
[   15.766860] dwc2xx-hcd 20980000.usb: 110 = 02001620; DWC_DV_TX_FIFO_SZ_REG(3)
[   15.774060] dwc2xx-hcd 20980000.usb: 114 = 02001820; DWC_DV_TX_FIFO_SZ_REG(4)
[   15.781254] dwc2xx-hcd 20980000.usb: 118 = 03001a20; DWC_DV_TX_FIFO_SZ_REG(5)
[   15.788393] dwc2xx-hcd 20980000.usb: 11c = 03001d20; DWC_DV_TX_FIFO_SZ_REG(6)
[   15.795588] dwc2xx-hcd 20980000.usb: 120 = 00000000; DWC_DV_TX_FIFO_SZ_REG(7)
[   15.802786] dwc2xx-hcd 20980000.usb: 124 = 02001020; DWC_DV_TX_FIFO_SZ_REG(8)
[   15.809982] dwc2xx-hcd 20980000.usb: 128 = 02001220; DWC_DV_TX_FIFO_SZ_REG(9)
[   15.817122] dwc2xx-hcd 20980000.usb: 12c = 02001420; DWC_DV_TX_FIFO_SZ_REG(10)
[   15.824406] dwc2xx-hcd 20980000.usb: 130 = 02001620; DWC_DV_TX_FIFO_SZ_REG(11)
[   15.831687] dwc2xx-hcd 20980000.usb: 134 = 02001820; DWC_DV_TX_FIFO_SZ_REG(12)
[   15.838914] dwc2xx-hcd 20980000.usb: 138 = 03001a20; DWC_DV_TX_FIFO_SZ_REG(13)
[   15.846196] dwc2xx-hcd 20980000.usb: 13c = 03001d20; DWC_DV_TX_FIFO_SZ_REG(14)
[   15.853480] dwc2xx-hcd 20980000.usb: 140 = 00000000; DWC_DV_TX_FIFO_SZ_REG(15)
[   15.860903] dwc2xx-hcd 20980000.usb: irq
[   15.870381] dwc2xx-hcd 20980000.usb: HCD v2.80a at MMIO 0x20980000 (irq = 33)

Oh look, I have an interrupt!

Signed-off-by: Simon Arlott <sa.me.uk>
dwc2xx_hcd: register usb hcd with the usb subsystem

Signed-off-by: Simon Arlott <sa.me.uk>
dwc2xx-hcd: reset and start the device

Signed-off-by: Simon Arlott <sa.me.uk>
dwc2xx_hcd: Don't reset again if the PHY is already configured

Signed-off-by: Simon Arlott <sa.me.uk>
dwc2xx-hcd: turn the power on/off at probe/remove time

Signed-off-by: Simon Arlott <sa.me.uk>
dwc2xx-hcd: document utmi_phy_data_width better

Signed-off-by: Simon Arlott <sa.me.uk>
dwc2xx-hcd: use new bcm-vc-power API

Signed-off-by: Simon Arlott <sa.me.uk>
dwc2xx-hcd: add a spinlock, hcd stop and shutdown functions

Signed-off-by: Simon Arlott <sa.me.uk>
dwc2xx-hcd: implement GetHubDescriptor

Signed-off-by: Simon Arlott <sa.me.uk>
dwc2xx-hcd: implement GetHubStatus

Signed-off-by: Simon Arlott <sa.me.uk>
dwc2xx-hcd: implement Set/ClearPortFeature USB_PORT_FEAT_POWER

Signed-off-by: Simon Arlott <sa.me.uk>
dwc2xx-hcd: update interrupt handling

Ignore almost all of the OTG interrupts...

Signed-off-by: Simon Arlott <sa.me.uk>
dwc2xx-hcd: tidy up interrupt handler

Signed-off-by: Simon Arlott <sa.me.uk>
dwc2-hcd: rename

Signed-off-by: Simon Arlott <sa.me.uk>
dwc2-hcd: finish host init

Signed-off-by: Simon Arlott <sa.me.uk>
dwc2-hcd: enable the root hub using polling

Signed-off-by: Simon Arlott <sa.me.uk>
dwc2-hcd: use DWC_PORT_INT

Signed-off-by: Simon Arlott <sa.me.uk>