aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-04-16ARMV7: tungsten: Cleanup build_server.shHEADtungsten-bootloader-ics-aahmastermainMike J. Chen
This script is used by the build server. It doesn't need conditional since this branch is tungsten specific. Also, MLO isn't needed since we use u-boot-spl.bin and have to sign it to generate the MLO file. Change-Id: Iadbb65ed02975a3691e4c7653d83f52bc9f7ecd4 Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-04-16ARMV7: tungsten: Build force_fastboot 3RD on builderNick Sanders
This gives us a versioned 3RD for use with usbboot. Change-Id: I2cf5553b84acd314958d997c2f6181fa7661461d Signed-off-by: Nick Sanders <nsanders@google.com>
2012-04-06ARMV7: tungsten: Update for hw versioningMike J. Chen
Add DVT6, PROD1-3, drop versions before DVT3. Remove runtime support for versions before DVT3. Change-Id: Ia49a5ed9935a3678ea2053c3daaa0714e9ba18e2 Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-04-05ARMV7: tungsten: Remove unneeded clearing of leds in avr detectMike J. Chen
Bug 6299538 This was some old code from the kernel which maintained a cache of the led state of the AVR. Bootloader has no state cache so really has no business setting the leds during init. Change-Id: Ic379f284c3e596907f749d9987a44c1bc8ce1ba8 Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-04-02ARMV7: tungsten: Make corresponding change to MPU_DPLL defineMike J. Chen
clock.c got changed so change our define. Change-Id: I249c2e5d05ff6ca3e0e7dccf507c2da622f60fbf Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-04-02Merge remote-tracking branch 'goog/android-master' into android-omap-tungstenMike J. Chen
2012-03-30OMAP4: Correct the frequency settingsMike J. Chen
The max dpll lock frequencies for CORE, MPU, IVA domains are set for OPP_NOM. But these are slightly changed as per the latest operating condition addendum V0.4 for 4460 and V0.7 for 4430. Updating this here. Change-Id: I44b8daa83821035b9392c01f749b60a9b357e7a7 Signed-off-by: R Sricharan <r.sricharan@ti.com> Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-30OMAP4+: Correct the dpll lock sequenceMike J. Chen
The recommended sequence to update the frequencies for different dplls are core, mpu, iva. Currently though core dpll is configured first locking is done only with the emif freq update mechanism. So the sequence is mpu, core. Change this so that the core dpll is locked first and only the post dividers are changed by freq update procedure later. Change-Id: I06a7fccd3e33905193d1c24b62e6b1e1ac8e44ef Signed-off-by: R Sricharan <r.sricharan@ti.com> Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-26TWL4030: Force power down before powering up the PHYMike J. Chen
To address issues with USB not enumerating properly when the cable is connected on a warm reboot, make sure the PHY is powered down before powering it up. This results in proper enumeration on a warm reboot. Change-Id: If52df6386ec7c8bd3c6715b96644e1dad752b9a7
2012-03-23ARMV7: OMAP3: MMC: Enable 8-bit mode for MMC1 and MMC2 controllersMike J. Chen
MMC0 is the only one limited to 4-bit on OMAP3. Change-Id: I31e922d39e4b23c3cc41f77f50d1ee572cc33364 Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-19ARMV7: tungsten: Modify config for new Samsung Smart configScott Anderson
The command to print Samsung SMART information was moved out of generic code. Change Tungsten's CONFIG to match. Change-Id: Ieb2f641856a8d99255e5dc8a8e3bc7134451f577 Signed-off-by: Scott Anderson <saa@android.com>
2012-03-19Merge branch 'android-master' into android-omap-tungstenScott Anderson
2012-03-16MMC: Move Samsung specific e-MMC code out of generic codeScott Anderson
I originally put the command to read the SMART information out of Samsung e-MMCs in the generic code because I thought I needed to use private MMC interfaces to accomplish it. I now know better and am moving the command out to its own separate file. Change-Id: I9b71a2da342dbff0122910c38bde48274d07452c Signed-off-by: Scott Anderson <saa@android.com>
2012-03-14Merge remote-tracking branch 'goog/android-master' into android-omap-tungstenMike J. Chen
2012-03-14FASTBOOT: Don't allow cmd_fastboot to be run twiceMike J. Chen
It's possible to make it work, but it's not a typical path and we'd rather make it an error than add support for it when it's going to be rarely used and will probably be fragile. Change-Id: I9a6f801a37c1cbe6e8c69ba6eb132d3ec116baa8 Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-14Merge remote-tracking branch 'goog/android-master' into android-omap-tungstenMike J. Chen
2012-03-13MMC: Fix error return on block erase.Scott Anderson
The code was returning a -1 from a function that returns an unsigned long. The correct error return is 0. Change-Id: Ie549d7f0c3305c5db258660486d07431a442d137 Signed-off-by: Scott Anderson <saa@android.com>
2012-03-07ARMV7: tungsten: Add CONFIG_OMAP_SECURE_HAL and CONFIG_OMAP_CPFROM to MFG buildMike J. Chen
Change-Id: Ic4ff50f814d486496b4e601007ef73bc25327581 Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-07Merge remote-tracking branch 'goog/android-master' into HEADMike J. Chen
2012-03-07OMAP4: Add command to call PPAL HAL CPFROM APIsMike J. Chen
PPA HAL CPFROM APIs are used to configure the CPFROM module and program eFuses. Change-Id: I33ba8a12f5bb1d51c6fbd47795a5f9491a4a1cf1 Signed-off-by: Carlos Leija <cileija@ti.com> Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-07ARMV7: omap4: Add Public to Secure entry API to call PPA HAL servicesMike J. Chen
Introduced abstraction API using Public ROM Code's PUBLIC_API_SEC_ENTRY API to call PPA HAL services. Change-Id: Iced8d3dc083d6a35bbab7f4680764395f47b9b2a Signed-off-by: Carlos Leija <cileija@ti.com> Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-03Merge branch 'android-master' into android-omap-tungstenMike J. Chen
2012-03-03ARMV7: OMAP4: USB: Configure twl6030x USB like ROM bootloaderMike J. Chen
This is a followup to commit 00261ba7a7e29c28708972c908a94993ea322dba. That change worked in that USB worked in fastboot if the cable is attached after boot, but had a bad side-effect that if we then booted to OS (using fastboot continue or fastboot reboot), then unplugged and replugged USB, USB wouldn't work. I believe the VUSB_IN_VBAT was not the right setting, but to be extra safe, I dumped the registers in question after the ROM set them up in the cold boot with USB cable attached case, and just made them the same. CFG_LDO_PD2 and USB_VBUS_CTRL_SET registers appeared to be already set to working values by the ROM bootloader in all cases, and VBUS_IN_PMID is set instead of VUSB_IN_VBAT. This fixes the plug/unplug problem in adb. Change-Id: I200e7701ca9905a6eba6f47ebd71787ea3dcb993 Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-03ARMV7: omap4: clocks: Change OPP50 from 175MHz to 350MHzMike J. Chen
There was an error in converting between dpll freq and MPU clock freq. The definition of OPP50 in the kernel is a MPU clock freq of 350MHz, which is a dpll freq of 700MHz. Change-Id: If6da9256d2e5b7f5f8e5fcbc5b06c9733e6af975 Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-03ARMV7: OMAP: Conditionalize vc.c for OMAP4 to fix OMAP3 buildsMike J. Chen
Change-Id: I5c217ffc87380453c4ad95b4e6c46a388f75970a Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-03ARMV7: OMAP3+ Fix voltage bringup sequenceMike J. Chen
This is a patch from TI, backported from patches sent by Nishanth Menon <nm@ti.com> to u-boot upstream from us. I made some changes to make it apply to our older version of u-boot. For OMAP4460, the main impact is that IVA voltage is now scaled after MPU. We already had MPU come up after CORE. Current configuration results in the following voltage waveform (example 4460 Panda ES): |---------------| (SET1 default 1.4V) | --------(programmed voltage) | <- (This switch happens on mux7,pullup) vdd_mpu(TPS) -----/ (OPP boot voltage) --------- (programmed voltage) vdd_IVA(TWL6030) -------------------------/ (OPP boot voltage) --------- (programmed voltage) vdd_core(TWL6030) -----------------------/ (OPP boot voltage) Problem 1) |<----- Tx ------>| timing violation for a duration Tx close to few milliseconds. Problem 2) voltage of MPU goes beyond spec for even the highest of MPU OPP. Problem 3) All SoCs are doing MPU, CORE, IVA - which is a timing violation Oscilloscope picture: http://goo.gl/SykHb By using GPIO as recommended as standard procedure by TI and fixing the sequence in this series changes this to: --------- (programmed voltage) vdd_IVA(TWL6030) ------------------/ (OPP boot voltage) -------- (programmed voltage) vdd_mpu(TPS) ----------------/ (Opp boot voltage) --------- (programmed voltage) vdd_core(TWL6030) -------------/ (OPP boot voltage) Oscilloscope Picture: http://goo.gl/PgyKt Why is this critical: without the voltage sequence fixes, certain intermediate circuitry inside OMAP behaves in often unpredictable manner as they are operating out of spec. This in production line(extreme example of OMAP4460) translates close to ~5% devices failing to boot up and shows all kind of random untraceable crashes in production kernel. NOTE: 1. Clock sequences need to be fixed as well 2. kernel.org support for PandaBoard ES(OMAP4460) depends on the current wrong setup of u-boot to allow kernel boot to take place. This can and must be fixed. Merging this series breaks k.org, as a temporary WA: run: mw.w 0x4A31E05A 0x1f on u-boot prompt prior to booting the kernel to replicate old broken logic. Tested on: Pandaboard vanilla - OMAP4430 Pandaboard ES - OMAP4460 OMAP5 EVM Change-Id: I368a78e05da53133d4453d21bce3c53ccdfc3a18 Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-03ARMV7: omap: Make udelay handle large values properlyMike J. Chen
The current implemention of __udelay() for omap didn't check for overflow so large values would wrap and not delay he time requested. Using similar logic to lib/time.c, break down large requests into smaller ones. Change-Id: I391e43a45068d4d3725d852f6b86ccec7e97b491 Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-03musb: Reset controller in case Linux or bootloader left it in bad stateMike J. Chen
Change-Id: I6c3f9d74a7b3faea783c48336afde2d0311491ed Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-03ARMV7: OMAP4: USB: Configure the twl603x LDO and USBMike J. Chen
Configure the LDO and other USB attributes for USB. Failed case was that USB was not detected if the unit was powered up without a usb cable attached. When the USB cable was attached the device would not enumerate. Patch originally from Dan Murphy with some modifications (cleanup ordering of #defines, add i2c_set_bus_num() in twl6030_usb_device_settings() in case other i2c bus had been used earlier). Change-Id: I15b578739ce506219c55b7ba8e4cb5525196aa86 Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-03MMC: Change erase to use Secure TrimScott Anderson
In the past, MMC erase used a combination of Secure Erase for erasing multiples of the erase group size and writing ones to "erase" the write blocks that were not a multiple of the erase group size. The following changes were made to this: 1) Secure Trim will be used for all erases as it can be used on write-block sized chunks instead of only on erase-group sized chunks. 2) Large erases will be split into multiple Secure Trims keeping the amount to be erased to no more than CONFIG_SYS_MMC_MAX_ERASE_COUNT erase groups. The default for CONFIG_SYS_MMC_MAX_ERASE_COUNT is 8192. Assuming an erase group size of 1024 write blocks, and a write block size of 512, the default maximum amount to be erased at one time is 4GB. This is to keep the timeouts from becoming ridiculously large and so we can keep the user informed of the progress. 3) Improved error reporting to understand more detail than "mmc erase failed". 4) Made the erase block functions consistent with the other block functions now that they didn't need to handle writing ones versus erasing. Change-Id: Iea5efe75892480f885b1ba49d93c79f891380faf Signed-off-by: Scott Anderson <saa@android.com>
2012-03-03FASTBOOT: Fix crash when erasing non-existent partitionScott Anderson
It's a bad idea to dereference a known NULL pointer. Change-Id: I5e56f55822b0e7200df6958658e6c7d709dab5ae Signed-off-by: Scott Anderson <saa@android.com>
2012-03-03ARMV7: OMAP: MMC: Relax erase timeouts and cleanupScott Anderson
We have occasionally seen erase timeout errors. Sometimes erases of 1M blocks will take around 6 seconds instead of the typical less than 1 second. I believe this is due to the MMC doing housekeeping. To try to prevent this from happening, the following changes have been made: 1) The base timeout for an erase used to be 5X the retry time. This change increases that to 10X. 2) Only a warning is printed when the timeout is first hit. The timeout is then doubled and if it is hit again, TIMEOUT will be returned and an error printed. In addition, several other minor changes were made: 1) The code used to add 1 ms per 1000 blocks to the timeout. This was changed to 1 ms to 1024 blocks to allow the compiler to optimize it to a shift instead of a divide. In addition, the comment was cleaned up (mainly to remove the inaccurate "1000 ms per 1 million blocks"). 2) Removed the "erasing %lu blocks" printf. Higher levels can print out advisory information if wanted. This matches the other hardware dependent MMC drivers I looked at. Change-Id: I9a03b93dc4adf3b6a4df34a1a2b592f6cad53a87 Signed-off-by: Scott Anderson <saa@android.com>
2012-03-03MMC: Fix erase group size if ERASE_GRP_DEFScott Anderson
When ERASE_GROUP_DEF (ext_csd[175]) is enabled, HC_ERASE_GRP_SIZE (ext_csd[224]) defines the erase group size in terms of 512KByte chunks, but erase_grp_size is in terms of number of write blocks. Change-Id: Id1d291fccf8a5920346045c84d71062ad7878533 Signed-off-by: Scott Anderson <saa@android.com>
2012-03-03MMC: Erase group size is in terms of write blocksScott Anderson
Although the READ_BL_LEN and WRITE_BL_LEN are usually the same for MMC, the erase group size is actually defined in terms of write blocks instead of read blocks. Change-Id: I4bf49aa42a78547ec17715a6c7709670206d5fb9 Signed-off-by: Scott Anderson <saa@android.com>
2012-03-03PARTITION/BLOCK COMMAND: Add an md5 subcommand to blk commandScott Anderson
To allow verification of the data written to block devices, it is useful to be able to calculate the MD5 hash of a number of sectors on a block device. To use this command, CONFIG_MD5 will need to be defined in addition to CONFIG_CMD_BLK. Change-Id: Ifae715179fd0be37be324306641418b545763bcc Signed-off-by: Scott Anderson <saa@android.com>
2012-03-03MD5 LIBRARY: Expose functions to do piecemeal MD5 calculationScott Anderson
The functions MD5Init, MD5Update and MD5Final are implemented in lib/md5.c but they were static to that file. This change promotes them to the global name-space so they can be used in code that wants to do an MD5 across more data than can fit in memory at one time. Change-Id: Ia9d73732268f6417ce267e4ea6dfb7e479ca1124 Signed-off-by: Scott Anderson <saa@android.com>
2012-03-03FASTBOOT: Fix sparse: out-length formatScott Anderson
The printf that outputs the length of a sparse file had a "0x" in front of a non-hex format (%llu). I removed the 0x and changed the format to work better with the way the fastboot program prints out the messages. Before: (bootloader) sparse: out-length-0x8415 MB After: (bootloader) sparse: out-length 8415 MB Change-Id: I5307c437dd02a5075f06ef728e1e0f58a34c4c94 Signed-off-by: Scott Anderson <saa@android.com>
2012-03-03FASTBOOT: Start fastboot when booti fails to find partitionMike J. Chen
Change-Id: Id4495766382d8d696575b1086703d816c458a2b5 Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-03FASTBOOT: Fix handling of sparse Don't Care chunks that span 4GBScott Anderson
A cast to u64 was missing so when the length of the chunk was calculated, it was truncated to a 32 bit value. Change-Id: Ia761f984bd65c24a77a1bdc0c094df5479c53f17 Signed-off-by: Scott Anderson <saa@android.com>
2012-03-03ARMV7: OMAP3: add defines needed for PWM & timersDmitry Grinberg
Change-Id: I457aa25d472a7e8cebd0252b2f7626ed7d786f0b
2012-03-03FASTBOOT: Add 'fastboot oem kmsg' - dumps kernel logMike J. Chen
Change-Id: I68df06a2cab8b288130014fe4b6738a59ab34979 Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-03ARMV7: omap4: clocks: Set voltages to nominal and order them correctlyMike J. Chen
This is a manual merge of changes from omapzoom and related to bug 5571804. From comments in that bug: "http://review.omapzoom.org/18458 http://review.omapzoom.org/18240 http://review.omapzoom.org/18321 http://review.omapzoom.org/18322 OR the equivalent - please ensure Voltage ramp is as follows step 1) vdd_core goes from OPP boot to OPP 100 V step 2) vdd_iva goes from OPP boot to OPP 100 V step 3) vdd_mpu goes from OPP boot to OPP 100 V directly - this involves two specific steps in the order as follows: 3.1) configure TPS's SET1 register to OPP100V (do not touch SET0 register) 3.2) switch GPIO to select SET1 register. Also we should ensure that OPP100V on all rails precisely match the data manuals' nominal voltages." Change-Id: Ida304c4d118d40bf29fbe4621f7b638afb4986c1 Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-03FASTBOOT: Add recovery:wipe_data support and fix some init sequencingMike J. Chen
An earlier change added a feature where fastboot would reboot to recovery to wipe data if told to by board specific key command. This change adds ability to do the same via a fastboot command, as well as being passed this from the kernel. This allows the following to work: $ fastboot oem recovery:wipe_data $ adb shell reboot recovery:wipe_data The latter may require root access because reboot is only root executable. Also fix some init sequencing problem. We need to init priv state earlier, otherwise we were calling saveenv() (to update flag to reboot into recovery again on next boot in case it didn't complete) but saving an uninitialized unlock state. Make fbt_clear_recovery_flag() only saveenv() if the value of FASTBOOT_RUN_RECOVERY_ENV_NAME had been set. Otherwise, make it a nop. This removes unnecessary writes to env partition when nothing has changed in the regular boot case. Change-Id: Ia8c9e8c52178e2a7d7dad002135e616f8f6f4d53 Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-03ARMV7: add DMA MMC writes to OMAP3 & OMAP4 devicesDmitry Grinberg
This commit enabled u-boot to do DMA writes to the MMC-based on the CONFIG_OMAP_MMC_DMA_WRITE option. This is done using the sDMA module of the OMAP, since that is the least common denominator between OMAP3 and OMAP4, thus allowing OMAP3 to benefint from this commit too. Included are: (1) include for SDMA addressed, structures, etc; (2) mini sDMA driver (embedded in ompa_hsmmc.c for now); and (3) sDMA intergration for MMC writes. Some code is present to demonstrate how to integrate read capability too, but read functionality is *untested* Change-Id: I74ce902fc4b88e783f2620188cff3ff27a7c1a4d
2012-03-03musb: Implement mode1 dma reads, conditionalized on CONFIG_MUSB_DMA_MODE1Mike J. Chen
Mode1 does all the full packet transfers using the dma engine, rather than mode0 which required the CPU to do copy out the packet from the receive buffer after each is received. It's a bit trickier to implement because the last packet is generally not full size and you need to handle that specially (we do the last transfer using mode0 dma). Change-Id: I1791cb746ee424c5ce5713af2156dd30ea468da9 Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-03FASTBOOT: Change udc buffer_length to size of expected transferMike J. Chen
This information is needed in order to implement MUSB mode1 dma support (in a separate change). Change-Id: Ic3d6749f3d7fd357194056d67b46f0cb73c85edb Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-03FASTBOOT: revert back to 512 byte packets for HSMike J. Chen
Although 1024 bytes seemed to work, it's non-standard and slows down transfers on macs. Change-Id: If1cce11a9a1ca77a6a2b316a927f744014a60709 Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-03FASTBOOT: Update unlock message/warning and add more calls to board_fbt_end()Mike J. Chen
The message shown when 'fastboot oem unlock' is called really should be device/board specific but I didn't want to refactor it all so took the shortcut of just updating the single version in cmd_fastboot.c. Also add more calls to board_fbt_end() and board_fbt_start(), especially when booti is called. Change-Id: If074415fcdbfa3adad03bdba20433d9761e37196 Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-03-03FASTBOOT: Allow fastboot version to be auto-generatedScott Anderson
If neither BUILD_TAG nor CONFIG_FASTBOOT_VERSION_BOOTLOADER is defined, CONFIG_FASTBOOT_VERSION_BOOTLOADER will be automatically defined. From comments in this change: * ... the form: * productnameYMDHB * where: * productname is FASTBOOT_PRODUCT_NAME * Y is the year with 'A' being 2011 and incrementing from there * M is the month * D is the day of the month * H is the hour * B is the minute divided by two * All of the fields are based upon the build time. M, D, H and B are all * output in base 36 (i.e. each digit is in the set 0-9A-Z). Change-Id: I3f0aee314e4eea35b9fe7a705df42984c8725cde Signed-off-by: Scott Anderson <saa@google.com>
2012-03-03musb: Clear dma channel controls on initMike J. Chen
On OMAP, the ROM bootloader uses DMA for USB and can leave the controller in such a state that the first DMA operation will fail when u-boot tries to use the controller. Change-Id: Ic28ac59b2dfbcde16edc54f89804928ffb6f4855 Signed-off-by: Mike J. Chen <mjchen@google.com>