Commit Graph

2978 Commits

Author SHA1 Message Date
Vipin KUMAR
23b0e6946b USB:gadget:designware Support high speed
This patch adds the support for usb device high speed for designware peripheral.

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
2012-03-19 00:08:17 +01:00
Vipin KUMAR
dc3e773918 USB:gadget:designware Device controller bugfixes
This patch fixes a few bugs in USB device controller driver.
The fixes are as follows
1. Adding error condition checks eg. NULL return
2. Endpoint other than endpoint 0 (control endpoint) are initialized
only if usb state machine reaches STATE_ADDRESSED or above
3. Zero length packet handling corrected
4. Dead code removed
5. Bulk out endpoint returns after servicing 1 interrupt and returns
back to service if more interrupts are pending

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Acked-by: Marek Vasut <marex@denx.de>
2012-03-19 00:08:17 +01:00
Vipin KUMAR
2721551a11 USB:gadget:designware USB device controller (UDC) implementation
The earlier usb device controller driver was specific to spear platforms. This
patch implements the usb device controller driver as a generic controller which
can be reused by other platforms using this peripheral.

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Acked-by: Marek Vasut <marex@denx.de>
2012-03-19 00:08:16 +01:00
Mike Frysinger
5b84dd67cf usb: replace wait_ms() with mdelay()
Common code has a mdelay() func, so use that instead of the usb-specific
wait_ms() func.  This also fixes the build errors:

ohci-hcd.c: In function 'submit_common_msg':
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1519:9: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1816:10: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1827:10: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1844:10: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1563:11: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1583:9: sorry, unimplemented: called from here
make[1]: *** [ohci-hcd.o] Error 1

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Marek Vasut <marex@denx.de>
2012-03-19 00:08:16 +01:00
Mike Frysinger
b974308105 usb: musb: fix printf warning
musb_hcd.c: In function 'musb_submit_rh_msg':
musb_hcd.c:827:2: warning: format '%d' expects type 'int',
	but argument 3 has type 'long unsigned int'

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-19 00:08:16 +01:00
Mike Frysinger
f6add132f6 net/miiphy/serial: drop duplicate "NAMESIZE" define
A few subsystems are using the same define "NAMESIZE".  This has been
working so far because they define it to the same number.  However, I
want to change the size of eth_device's NAMESIZE, so rather than tweak
the define names, simply drop references to it.  Almost no one does,
and the handful that do can easily be changed to a sizeof().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-18 20:11:22 +01:00
Wolfgang Denk
6e94125f9c Merge branch 'master' of git://git.denx.de/u-boot-avr32
* 'master' of git://git.denx.de/u-boot-avr32:
  atmel_mci.h: remove outdated register macros
  doc/git-mailrc: add <me> to avr32 alias
  ATMEL: remove old atmel_mci driver
  ATMEL: use generic mmc framework
2012-03-17 21:50:59 +01:00
Wolfgang Denk
6ae38b8c58 Merge branch 'sandbox' of git://git.denx.de/u-boot-blackfin
* 'sandbox' of git://git.denx.de/u-boot-blackfin:
  sandbox: mark os_exit as noreturn
  sandbox: add getopt support
  sandbox: allow processing before main loop
  sandbox: add concept of sandbox state
  sandbox: disable fortification
  sandbox: u-boot.lds: tweak style
  sandbox: add get_{tbclk,ticks}
  sandbox: enable GPIO driver
  sandbox: gpio: add basic driver for simulating GPIOs
  sandbox: add flags for open() call
  sandbox: config: enable fdt and snprintf() options
  sandbox: fdt: add support for CONFIG_OF_CONTROL
  sandbox: add lseek helper
  sandbox: add ifdef protection to os.h
  sandbox: add required header to os.c
  sandbox: sort header files in os.c
2012-03-17 21:46:33 +01:00
Sven Schnelle
c9abb4260c ATMEL: remove old atmel_mci driver
All boards are using the gen_atmel_mci driver now, so no need
to carry the old driver around.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2012-03-13 12:06:42 +01:00
Sven Schnelle
72fa467988 ATMEL: use generic mmc framework
gen_atmel_mci works on AVR32 as well, so no need to use the legacy
mmc driver. This also has the nice side effect of being able to use
SDHC cards an those boards.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2012-03-13 12:06:41 +01:00
Simon Glass
8d30fcd9a1 sandbox: gpio: add basic driver for simulating GPIOs
This provides a way of simulating GPIOs by setting values which are seen
by the normal gpio_get/set_value() calls.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-12 11:03:42 -04:00
Phil Edworthy
117029c510 sh: Fix sh7264 clock speed and related serial setting
The generalised calculation of the serial bit rate reg also applies
to sh7264, it was just the clock speed that was set incorrectly.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2012-03-08 10:26:32 +09:00
Nobuhiro Iwamatsu
73dba948f5 net: sh_eth: Remove unnecessary return
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2012-03-08 10:26:18 +09:00
Nobuhiro Iwamatsu
4ba62c7290 net: sh_eth: Collect up EDMR_INIT_CNT to TIMEOUT_CNT
EDMR_INIT_CNT holds the check count of initialization.
Since there were more same values (1000), this collected as TIMEOUT_CNT.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2012-03-08 10:26:14 +09:00
Nobuhiro Iwamatsu
1d4a2c913f net: sh_eth: Remove SH_ETH_PHY_DELAY
SH_ETH_PHY_DELAY is not used.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2012-03-08 10:26:10 +09:00
Nobuhiro Iwamatsu
3bb4cc312d sh: sh_eth: Add support SH7724
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2012-03-08 10:25:49 +09:00
Thomas Weber
b199c6e2d7 Remove execute permissions from source files
Signed-off-by: Thomas Weber <weber@corscience.de>
2012-03-04 21:56:15 +01:00
Linus Walleij
a1e47b66d9 pci: move pciauto_config_init() to pci.h
Fixing build regressions for the Integrator I get find that a few
boards try to work around the missing declaration of
pciauto_config_init() by declaring it in the local scope. This
does not make sense when the sibling functions are in <pci.h>
so move the function to the header, ridding the build error
in the Integrator and getting rid of the local declarations
here and there.

Reported-by:  Wolfgang Denk <wd@denx.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-03-04 21:13:33 +01:00
amartin@nvidia.com
f9636e8d38 USB: move keyboard polling into kbd driver
This moves keyboard polling logic from USB HCD drivers into USB
keyboard driver.  Remove usb_event_poll() as keyboard polling was
the only user of this API.  With this patch USB keyboard works with
EHCI controllers again.  Tested on a tegra2 seaboard.

Signed-off-by: Allen Martin <amartin@nvidia.com>
2012-03-03 16:56:29 +01:00
Vincent Palatin
e7e982d69c eth: remove usb-ethernet devices before re-enumerating them
Fix the crash when running several times usb_init() with a USB ethernet
device plugged.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Wolfgang Grandegger <wg@denx.de>
2012-03-03 16:56:04 +01:00
Wolfgang Denk
e91004201c Merge branch 'master' of git://git.denx.de/u-boot-nand-flash
* 'master' of git://git.denx.de/u-boot-nand-flash:
  cmd_nand.c: Fix 'nand dump' after latest MTD resync
  mtd/nand:Fix wrong usage of is_blank() in fsl_ifc_run_command
  mtd/nand: Fix IFC driver to support 2K NAND page
  nand: reinstate lazy bad block scanning
  Revert "nand: make 1-bit software ECC configurable"
2012-03-03 15:15:07 +01:00
Prabhakar Kushwaha
5f720b8514 mtd/nand:Fix wrong usage of is_blank() in fsl_ifc_run_command
Freescale IFC NAND Machine calculates ECC on 512byte sector and same is used in
fsl_ifc_run_command() during ECC status verification. Also this sector is passed
to is_blank() for blank checking. It is wrong at first place because
is_blank()'s implementation checks for Page size and OOB area size.
is_blank() should be called per page for main and OOB area verification.

Variables name are redefined to avoid confusion between buffer and ecc sector.

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-02-28 14:03:39 -06:00
Prabhakar Kushwaha
d90361285c mtd/nand: Fix IFC driver to support 2K NAND page
1) OOB area should be updated irrespective of NAND page size. Earlier it was
updated only for 512byte NAND page.

2) During OOB update fbcr should be equal to OOB size.

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-02-28 14:03:39 -06:00
Scott Wood
fb49454b1b nand: reinstate lazy bad block scanning
commit 2a8e0fc8b3 ("nand: Merge changes
from Linux nand driver") accidentally reverted commit
13f0fd94e3 ("NAND: Scan bad blocks
lazily.").

Reinstate the change, as amended by commit
ff49ea8977 ("NAND: Mark the BBT as scanned
prior to calling scan_bbt.").

Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-02-28 14:03:39 -06:00
Scott Wood
1f7b1743d3 Revert "nand: make 1-bit software ECC configurable"
This reverts commit 4fee6c2f29.

It breaks boards that currently rely on soft-ecc, as pointed out here:
http://patchwork.ozlabs.org/patch/140872/

The reverted patch should be resubmitted with documentation, and with the
CONFIG_MTD_ECC_SOFT selected from every board that needs it.  We could
start by looking at what NAND driver the board selects, and whether
that driver ever asks for soft ECC.

Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-02-28 14:03:39 -06:00
Troy Kisky
9fafe7dab9 net: phy: make board_phy_config responsible for calling drv->config
Boards may have things they want done before or after normal phy config.
Letting the boards call drv->config allows them more flexibilty.
Boards affected by this change are corenet_ds and mpc8544ds.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
2012-02-27 21:19:25 +01:00
Troy Kisky
8682aba7da net: phy: add support for Micrel's KSZ9021
Add the gigabit phy KSZ9021.
Also, add function ksz9021_phy_extended_write
/_read for access to the phys extended registers.
The environment variable "disable_giga"
can be used to disable 1000baseTx.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
2012-02-27 21:19:25 +01:00
Troy Kisky
13947f43c9 net: fec_mxc: add PHYLIB support
Surround non PHYLIB routines miiphy_restart_aneg
and miiphy_wait_aneg with ifndef CONFIG_PHYLIB.
When later PHYLIB is required it is easy to delete
the non-PHYLIB code. This separation idea
came from Andy Fleming.

fec_miiphy_read, and fec_miiphy_write changed to
fec_phy_read, and fec_phy_write with argument changes.

Deprecated miiphy_register is no longer used. Both
old and new PHYLIB code now use mdio_register.

Cleanup some debug prints.

Inline function fec_miiphy_fec_to_eth is no longer necessary.
Moved to the single call location.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
2012-02-27 21:19:24 +01:00
Troy Kisky
28774cbaac net: fec_mxc: add 1000 Mbps selection
Define FEC_QUIRK_ENET_MAC and add to
arch-mx6/imx-regs.h

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
2012-02-27 21:19:24 +01:00
Eric Nelson
08c61a589b mxc_spi: move machine specifics into CPU headers
Move (E)CSPI register declarations into the imx-regs.h files for each supported CPU

Introduce two new macros to control conditional setup
     MXC_CSPI - Used for processors with the Configurable Serial Peripheral Interface (MX3x)
     MXC_ECSPI - For processors with Enhanced Configurable... (MX5x, MX6x)

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Jason Liu <jason.hui@linaro.org>
Tested-by: Jason Liu <jason.hui@linaro.org>
2012-02-27 21:19:23 +01:00
Tom Rini
cec487a435 Revert "ARM: I2C: I2C Multi byte address support"
This reverts commits 2faa76196a as
this has introduced some large problems on all other platforms and have
more changes in them than the commit message implies.

Cc: Heiko Schocher <hs@denx.de>
Cc: Patil, Rachna <rachna@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
2012-02-21 07:28:47 +01:00
Tom Rini
c2459a405b Revert "ARM: AM33XX: Add AM33XX I2C driver support"
This reverts commit 498cbdfe62 as we need
to revert the i2c changes that add the support for the platform.

Cc: Heiko Schocher <hs@denx.de>
Cc: Patil, Rachna <rachna@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
2012-02-21 07:28:29 +01:00
Wolfgang Denk
2acca35ce4 Merge branch 'master' of git://git.denx.de/u-boot-mmc
* 'master' of git://git.denx.de/u-boot-mmc:
  mmc: make mmc_send_status() more reliable
  mmc: fix card busy polling
  Tegra: mmc: Fixed handling of interrupts in timeouts.
  omap_hsmmc: Wait for CMDI to be clear
2012-02-17 23:54:46 +01:00
Wolfgang Denk
dbe20fc797 Merge branch 'trini@ti.com' of git://git.denx.de/u-boot-staging
* 'trini@ti.com' of git://git.denx.de/u-boot-staging:
  usb_ether: fix typo
  cmd_eeprom: typo
  doc: complete, typos
2012-02-17 23:52:52 +01:00
Jan Kloetzke
d617c426a6 mmc: make mmc_send_status() more reliable
Align the card status polling with the Linux kernel and retry the
command at least five times. Also some cards apparently mishandle the
status bits, so make sure to check the card state too.

Signed-off-by: Jan Kloetzke <jan.kloetzke@dspg.com>
Cc: Andy Fleming <afleming@gmail.com>
2012-02-15 17:42:22 -06:00
Jan Kloetzke
93ad0d18c0 mmc: fix card busy polling
A MMC/SD card may always go into the programming state (and hence be
busy) after a block write. Therefore always check the card state, even
after single block writes. On the other hand there is no need to check
the card status after a read.

Also make sure that errors during busy polling are propagated upwards.

Signed-off-by: Jan Kloetzke <jan.kloetzke@dspg.com>
Cc: Andy Fleming <afleming@gmail.com>
2012-02-15 17:42:22 -06:00
Tom Warren
cf39cf5597 Tegra: mmc: Fixed handling of interrupts in timeouts.
We are seeing occasional timeouts in the Tegra mmc code when
we are reading from external MMC cards. These don't seem to be
detrimental if they are handled properly.  This CL properly
clears the "normal interrupt status register" (norintsts) in
error conditions.  If we don't do this, when we come back into
mmc_send_cmd() the register will still contain status from the
last transaction.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-02-15 17:42:22 -06:00
Tom Rini
a7778f8fbe omap_hsmmc: Wait for CMDI to be clear
Before we can send a command we need both the DATI (command inhibit on
mmc_dat line) bit and CMDI (command inhibit on mmc_cmd line) are clear.
The previous behavior of only checking on DATI was insufficient on some
cards and incorrect behavior in any case.  This makes the code check
for both bits being clear and makes the error print more clear as
to what happened.  DATI_CMDDIS is removed as it was unused elsewhere
in the code and stood for 'DATI is set, cmds are disabled still'.

Fix originally spotted by Peter Bigot.

Tested-by: Peter A. Bigot <bigotp@acm.org>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Signed-off-by: Tom Rini <trini@ti.com>
Tested-by: Andreas Müller <schnitzeltony@googlemail.com>
2012-02-15 17:42:22 -06:00
Peter Meerwald
d1f862f97e usb_ether: fix typo
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2012-02-14 11:02:46 -07:00
Wolfgang Denk
e9d44b35be Merge branch 'sf' of git://git.denx.de/u-boot-blackfin
* 'sf' of git://git.denx.de/u-boot-blackfin:
  README: Add description of SPI Flash (SF) command configuration
  sf command: allow default bus and chip selects
  sf: eeprom_m95xxx: set a sane default timeout
  sf: eeprom_m95xxx: fix up style
2012-02-13 23:15:25 +01:00
Wolfgang Denk
06576b2efc Merge branch 'master' of git://git.denx.de/u-boot-blackfin
* 'master' of git://git.denx.de/u-boot-blackfin:
  Blackfin: pata_bfin: fix printf warning
  Blackfin: bfin_nand: mark local func static
  linkage.h: move from blackfin to common includes
  Blackfin: br4: new board port
  Blackfin: add in/out le32 variants
  post: add blackfin to the post_time_ms list
  Blackfin: bf537-stamp: drop board reset workaround
  Blackfin: pr1: new board port
2012-02-13 23:13:22 +01:00
Mike Frysinger
8b463dab93 sf: eeprom_m95xxx: set a sane default timeout
Every board currently defines this to the same value, so just default
to that to avoid having to make everyone do the same thing.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12 15:18:28 -05:00
Mike Frysinger
a1f77b696d sf: eeprom_m95xxx: fix up style
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12 15:18:28 -05:00
Mike Frysinger
44f67f7848 Blackfin: pata_bfin: fix printf warning
pata_bfin.c: In function 'bfin_ata_identify':
pata_bfin.c:887:2: warning: format '%x' expects type 'unsigned int',
	but argument 2 has type 'lbaint_t'

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12 15:03:26 -05:00
Mike Frysinger
3f54108be9 Blackfin: bfin_nand: mark local func static
This devready func is only used in this driver, so mark it static.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12 15:03:26 -05:00
Govindraj.R
43b62393da ehci-omap: Clean up added ehci-omap.c
Clean up added ehci-omap.c and make it generic for re-use across
omap-soc having same ehci ip block. Also pass the modes to be configured
from board file and configure the ports accordingly. All usb layers
are not cache aligned, till then keep cache off for usb ops as ehci will use
internally dma for all usb ops.

* Add a generic common header ehci-omap.h having common ip block
  data and reg shifts.
* Rename and modify ehci-omap3 to ehci.h retain only conflicting
  sysc reg shifts remove others and move to common header file.
* pass the board data for beagle/panda accordinly to use
  ehci ports.

Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
2012-02-12 10:11:31 +01:00
Ilya Yanok
29321c0518 ehci-omap: driver for EHCI host on OMAP3
Taken from Beagle code. Tested on mcx board (AM3517-based).

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Tested-by: Stefano Babic <sbabic@denx.de>
2012-02-12 10:11:30 +01:00
Govindraj.R
928c4bdf9b usb: ulpi: Add omap-ulpi-view port support
Based on discussion from this thread [1].
Adding omap-view port that helps us in using the generic ulpi
framework for any ulpi phy ops using the INSNREG05_ULPI viewport
reg available on omap platform.

Currently ehci ports are available on omap3/4 platforms so enable the same
for beagle and panda, patch is tested on the same boards.

Thanks to Igor Grinberg <grinberg@compulab.co.il> for reviewing the
omap-ehci patches and suggesting this approach.

[1]: http://www.mail-archive.com/u-boot@lists.denx.de/msg76076.html

Tested-by: Stefano Babic <sbabic@denx.de>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
2012-02-12 10:11:30 +01:00
Govindraj.R
3e6e809f56 usb: ulpi: Extend the existing ulpi framework.
Extend the existing ulpi viewport framework
to pass the port number information for any ulpi
ops. Fix the usage of ulpi api's accordingly.

Tested-by: Stefano Babic <sbabic@denx.de>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
2012-02-12 10:11:30 +01:00
Albert ARIBAUD
805ad7ee2d orion5x: add USB host ehci-marvell support
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
2012-02-12 10:11:28 +01:00