summaryrefslogtreecommitdiff
path: root/drivers
Commit message (Collapse)AuthorAgeLines
* 83xx/85xx/86xx: LBC register cleanupBecky Bruce2010-07-16-11/+7
| | | | | | | | | | | | | | | | | | | | | Currently, 83xx, 86xx, and 85xx have a lot of duplicated code dedicated to defining and manipulating the LBC registers. Merge this into a single spot. To do this, we have to decide on a common name for the data structure that holds the lbc registers - it will now be known as fsl_lbc_t, and we adopt a common name for the immap layouts that include the lbc - this was previously known as either im_lbc or lbus; use the former. In addition, create accessors for the BR/OR regs that use in/out_be32 and use those instead of the mismash of access methods currently in play. I have done a successful ppc build all and tested a board or two from each processor family. Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org> Acked-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Merge branch 'next' of git://git.denx.de/u-boot-niosWolfgang Denk2010-07-14-8/+4
|\
| * gpio_led: add gpio_request to __led_initThomas Chou2010-07-12-8/+4
| | | | | | | | | | | | | | | | This patch adds the gpio usage request. The polarity is changed to positive as suggested by Mike Frysinger. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Scott McNutt <smcnutt@psyent.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-netWolfgang Denk2010-07-14-825/+1740
|\ \
| * | mvgbe: add support for orion5x GbE controllerAlbert Aribaud2010-07-12-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add definitions and initialization in orion5x for mvgbe. Add orion5x in mvgbe SoC includes. Signed-off-by: Albert Aribaud <albert.aribaud@free.fr> Acked-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | mvgbe: support SoCs other than kirkwoodAlbert Aribaud2010-07-12-401/+421
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rename all references to kirkwood in mvgbe symbols throughout the whole codebase. Signed-off-by: Albert Aribaud <albert.aribaud@free.fr> Acked-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | net: rename: kirkwood_egiga as mvgbeAlbert Aribaud2010-07-12-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rename kirkwood_egiga.* to mvgbe.* and adjust makefile and #include accordingly. Signed-off-by: Albert Aribaud <albert.aribaud@free.fr> Acked-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | kirkwood_egiga: CONFIG_SKIP_LOCAL_MAC_RANDOMIZATIONAlbert Aribaud2010-07-12-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | This configuration option allows SoCs without random generation capability to fill in local MACs with a fixed rather than random value Signed-off-by: Albert Aribaud <albert.aribaud@free.fr> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | cpuat91: unbreak ethernetEric Bénard2010-07-12-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * the following problems are met : config was set to use the new driver as a default but - RMII was not enabled for the new driver - the new driver didn't compile with RMII enabled - the new driver initialize a PHY at address O when the PHY of this board is at 1 thus we get "AT91 EMAC RMII: No PHY present" * to fix these problems, this patch : - enable RMII for the new driver - fix the wrong define used in the at91_emac.c - allow the config file to set a default phy address (and use 0 as a default as in the actual at91_emac.c driver) Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | at91_emac: Write MAC address automaticallyEric Bénard2010-07-12-8/+20
| | | | | | | | | | | | | | | | | | | | | tested on cpuat91. Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | AX88180: use standard I/O accessorsMike Frysinger2010-07-12-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current dm9000x driver accesses its memory mapped registers directly instead of using the standard I/O accessors. This can cause problems on Blackfin systems as the accesses can get out of order. So convert the direct volatile dereferences to use the normal in/out macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Tested-by: Hoan Hoang <hnhoan@i-syst.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | AX88180: make OUTW handle 32bit/16bit defines tooHoan Hoang2010-07-12-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current OUTW function is always defined as a 16bit function, but this doesn't work correctly when using the 32bit access mode. So define it as a 32bit function when in 32bit mode so things work correctly on Blackfin 32bit LE systems. Signed-off-by: Hoan Hoang <hnhoan@i-syst.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | AX88180: add support for the Marvell 88E1118 phyHoan Hoang2010-07-12-12/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some places in the current code equate the Marvell 88E1111 PHY as the family when in reality it's a subpart of the Alaska family. So once we generalize that, add support for the 88E1118 PHY. Signed-off-by: Hoan Hoang <hnhoan@i-syst.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | Write MAC address automatically on MACB-based boardsBen Warren2010-07-12-8/+15
| | | | | | | | | | | | | | | | | | Also, remove all calls to eth_init() in boards that use MACB Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | tsec: fix the return value for tsec_eth_init()Timur Tabi2010-07-12-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Ethernet initialization functions are supposed to return the number of devices initialized, so fix tsec_eth_init() so that they returns the number of TSECs initialized, instead of just zero. This is safe because the return value is currently ignored by all callers, but now they don't have to ignore it. In general, if an function initializes only one device, then it should return a negative number if there's an error. If it initializes more than one device, then it should never return a negative number. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | uli526x: drop newlines from device nameMike Frysinger2010-07-12-1/+1
| | | | | | | | | | | | | | | | | | | | | Device names should not contain non-printable characters like newlines. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | AX88180: switch to common mii.h headerMike Frysinger2010-07-12-61/+18
| | | | | | | | | | | | | | | | | | | | | | | | No compiled code change here, just drop the local PHY defines in favor of the common standard ones. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | AX88180: improve phy searchingMike Frysinger2010-07-12-39/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than hardcode specific phy addresses, search the possible phy address space to find the first available phy. Also respect the normal CONFIG_PHY_ADDR option for board porters to pick a specific address. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | AX88180: fix media typosHoan Hoang2010-07-12-10/+10
| | | | | | | | | | | | | | | | | | Signed-off-by: Hoan Hoang <hnhoan@i-syst.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | kirkwood_egiga: updates: fix DRAM mapping and typoAlbert Aribaud2010-07-12-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DRAM window mapping uses kirkwood-provided functions instead of global gd as do other drivers--fix this. Also, fix a typo in a comment Signed-off-by: Albert Aribaud <albert.aribaud@free.fr> Acked-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | SPEAr : Network driver support addedVipin KUMAR2010-07-12-0/+796
| | | | | | | | | | | | | | | | | | | | | | | | Designware network driver support added. This is a Synopsys ethernet controller Signed-off-by: Vipin Kumar <vipin.kumar@st.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | kirkwood_egiga: bugfix: add DMA sequence pointsAlbert Aribaud2010-07-12-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Insert isb() sequence points to ensure DMA descriptors are filled in and set up before actual DMA occurs. Signed-off-by: Albert Aribaud <albert.aribaud@free.fr> Acked-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | net: Add option to disable fiber on M88E1111 PHY for PPC4xxStefan Roese2010-07-12-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By defining CONFIG_M88E1111_DISABLE_FIBER boards can configure the M88E1111 PYH to disable fiber. This is needed for an upcoming PPC460GT based board, which has fiber/copper auto-selection enabled by default. This doesn't seem to work. So we disable fiber in the PHY register. Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | net: dm9000x: re-add casts to I/O pointers to fix gcc warningsMike Frysinger2010-07-12-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DM9000 in/out helper functions were casting the register address when it was accessing things directly (pre commit a45dde2293c816138e53c). But when it was changed to using the in/out helpers, those casts were dropped because those functions don't take pointers. Even more recently, those functions were then changed to use the read/write helpers, but the casts were not re-added. This is necessary because the read/write helpers do take pointers. Otherwise we get a lot of warnings like: dm9000x.c: In function 'dm9000_inblk_8bit': dm9000x.c:172: warning: passing argument 1 of 'readb' makes pointer from integer without a cast Signed-off-by: Mike Frysinger <vapier@gentoo.org> Tested-by: Thomas Weber <weber@corscience.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | tsec: add micrel ksz804 phyHeiko Schocher2010-07-12-0/+22
| |/ | | | | | | | | Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-blackfinWolfgang Denk2010-07-14-253/+147
|\ \
| * | Blackfin: bfin_mac: remove space from nameMike Frysinger2010-07-13-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Some commands (like 'mii') use this name to select devices, but they break when those names contain spaces. So drop the space from the Blackfin EMAC driver. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * | Blackfin: bfin_spi: support gpios as chip selectsMike Frysinger2010-07-13-28/+57
| | | | | | | | | | | | | | | | | | | | | Rather than only support the pins dedicated as chip selects, utilize the gpio framework to support any gpio pin. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * | Blackfin: bfin_spi: convert to portmux frameworkMike Frysinger2010-07-13-159/+50
| | | | | | | | | | | | | | | | | | | | | Rather than bang MMRs directly, use the new portmux framework to handle the details. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * | Blackfin: pata_bfin: convert to portmux frameworkMike Frysinger2010-07-13-13/+12
| | | | | | | | | | | | | | | | | | | | | Rather than bang MMRs directly, use the new portmux framework to handle the details. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * | Blackfin: bfin_sdh: convert to portmux frameworkMike Frysinger2010-07-13-9/+9
| | | | | | | | | | | | | | | | | | | | | Rather than bang MMRs directly, use the new portmux framework to handle the details. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * | Blackfin: bfin_nand: convert to portmux frameworkMike Frysinger2010-07-13-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | Rather than bang MMRs directly, use the new portmux framework to handle the details. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Scott Wood <scottwood@freescale.com>
| * | Blackfin: bfin_mac: convert to portmux frameworkMike Frysinger2010-07-13-36/+11
| |/ | | | | | | | | | | | | | | | | | | Rather than bang MMRs directly, use the new portmux framework to handle the details. While we're doing this, let boards declare the exact list of pins they need in case there is one or two they don't actually have hooked up. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Ben Warren <biggerbadderben@gmail.com>
* | mtd: nand_plat: add simple GPIO framework DEV_READY optionMike Frysinger2010-07-08-0/+11
| | | | | | | | | | | | | | | | Make it easy to use GPIOs for the DEV_READY pin by using the common GPIO framework. Also make the NAND_PLAT_INIT() define optional. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Tested-by: Thomas Chou <thomas@wytron.com.tw>
* | NAND: add Toshiba TC58NVG0 identifierFlorian Fainelli2010-07-08-0/+1
| | | | | | | | | | | | | | The Toshiba TC58NVG0* parts are 128Mbytes x 8 bits 3.3V parts with the 0xD1 identifier. Add these to the list of known devices IDs. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
* | NAND: show manufacturer and device ID for unknown chipsFlorian Fainelli2010-07-08-1/+5
|/ | | | | | | | When the NAND part is not supported, it is useful to show the manufacturer and device ID to help debugging and reporting. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* Make sure that argv[] argument pointers are not modified.Wolfgang Denk2010-07-04-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* Merge branch 'sf' of git://git.denx.de/u-boot-blackfinWolfgang Denk2010-07-04-16/+44
|\
| * sf: move useful messages from debug to printfMike Frysinger2010-06-30-16/+22
| | | | | | | | | | | | | | | | | | | | At the moment, the default SPI flash subsystem is quite terse. Errors and successes both result in a generic message. So move the useful errors and useful successes to printf output by default. While we're here, also convert the messages to use print_size(). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * spi_flash: support old STMicro parts with RESThomas Chou2010-06-30-0/+22
| | | | | | | | | | | | | | | | Some old STMicro parts do not support JEDEC ID (0x9f). This patch uses RES (0xab) to get Electronic ID and translates it to JEDEC ID. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Mike Frysinger <vapier@gentoo.org>
* | drivers/usb/host/ohci-hcd: rename readl/writel to ohci_readl/ohci_writelBecky Bruce2010-06-30-80/+85
| | | | | | | | | | | | | | | | | | This avoids a build warning that you see if anyone in the header chain has included io.h (which is coming shortly). The previous code redefined readl/writel; this patch renames it to be specific to ohci. The defines are also moved from ohci-hcd.c to ohci.h. Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
* | musb: Program extvbus for OMAP3EVM Rev >= EAjay Kumar Gupta2010-06-30-0/+7
| | | | | | | | | | | | | | | | OMAP3EVM Rev >=E uses external Vbus supply so setting 'extvbus' to '1' for OMAP3EVM Rev >=E runtime based on EVM revision. CC: Remy Bohmer <linux@bohmer.net> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
* | musb: Add Phy programming for using external VbusAjay Kumar Gupta2010-06-30-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MUSB PHY on OMAP3EVM Rev >= E uses external Vbus supply to support 500mA of power.We need to program MUSB PHY to use external Vbus for this purpose. Adding 'extvbus' member in musb_config structure which should be set by all the boards where MUSB interface is using external Vbus supply. Also added ULPI bus control register read/write abstraction for Blackfin processor as it doesn't have ULPI registers. CC: Remy Bohmer <linux@bohmer.net> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
* | musb: Use name based initialization for musb_configAjay Kumar Gupta2010-06-30-9/+9
| | | | | | | | | | | | | | | | | | | | | | Changed musb_config initialization for omap3.c, davinci.c and da8xx.c using name of structure fields. This would cause the uninitialized field to be null by default and thus would help in avoiding to init some flags required to be set only for a few selected platforms. CC: Remy Bohmer <linux@bohmer.net> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
* | USB OHCI support for at91sam9g45 SoCSergey Matyukevich2010-06-30-0/+14
|/ | | | | | | | | | Add USB OHCI support for at91sam9g45ekes/at91sam9m10g45ek boards. Note that according to errata from Atmel, OHCI is not operational on the first revision of at91sam9g45 chip. So this patch enables OHCI support for later revisions. Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
* Merge branch 'master' into nextWolfgang Denk2010-06-30-3/+6
|\
| * EHCI: zero out QH transfer overlay in ehci_submit_async()Sergei Shtylyov2010-06-29-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ehci_submit_async() doesn't really zero out the QH transfer overlay (as the EHCI specification suggests) which leads to the controller seeing the "token" field as the previous call has left it, i.e.: - if a timeout occured on the previous call (Active bit left as 1), controller incorrectly tries to complete a previous transaction on a newly programmed endpoint; - if a halt occured on the previous call (Halted bit set to 1), controller just ignores the newly programmed TD(s) and the function then keeps returning error ad infinitum. This turned out to be caused by the wrong orger of the arguments to the memset() call in ehci_alloc(), so the allocated TDs weren't cleared either. While at it, stop needlessly initializing the alternate next TD pointer in the QH transfer overlay... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Acked-by: Remy Bohmer <linux@bohmer.net>
| * tsec: Fix eTSEC2 link problem on P2020RDBFelix Radensky2010-06-29-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On P2020RDB eTSEC2 is connected to Vitesse VSC8221 PHY via SGMII. Current TBI PHY settings for SGMII mode cause link problems on this platform, link never comes up. Fix this by making TBI PHY settings configurable and add a working configuration for P2020RDB. Signed-off-by: Felix Radensky <felix@embedded-sol.com> Acked-by: Andy Fleming <afleming@freescale.com> Acked-by: Peter Tyser <ptyser@xes-inc.com> Tested-by: Peter Tyser <ptyser@xes-inc.com>
* | Merge branch 'next' of git://git.denx.de/u-boot-ti into nextWolfgang Denk2010-06-29-67/+128
|\ \
| * | Davinci: SPI performance enhancementsNick Thompson2010-06-22-67/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following restructuring and optimisations increase the SPI read performance from 1.3MiB/s (on da850) to 2.87MiB/s (on da830): Remove continual revaluation of driver state from the core of the copy loop. State can not change during the copy loop, so it is possible to move these evaluations to before the copy loop. Cost is more code space as loop variants are required for each set of possible configurations. The loops are simpler however, so the extra is only 128bytes on da830 with CONFIG_SPI_HALF_DUPLEX defined. Unrolling the first copy loop iteration allows the TX buffer to be pre-loaded reducing SPI clock starvation. Unrolling the last copy loop iteration removes testing for the final loop iteration every time round the loop. Using the RX buffer empty flag as a transfer throttle allows the assumption that it is always safe to write to the TX buffer, so polling of TX buffer full flag can be removed. Signed-off-by: Nick Thompson <nick.thompson@ge.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>