x-loader:x-loader.git
6 years agoDefault to building signGP and a signed x-loader unified
Loïc Minier [Mon, 21 Feb 2011 08:36:03 +0000 (08:36 +0000)]
Default to building signGP and a signed x-loader

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
6 years agoMerge signGP cflags into HOSTCFLAGS and use these
Loïc Minier [Mon, 21 Feb 2011 08:36:03 +0000 (08:36 +0000)]
Merge signGP cflags into HOSTCFLAGS and use these

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
6 years agoAppend CFLAGS and HOSTCFLAGS to environment
Loïc Minier [Mon, 21 Feb 2011 08:36:02 +0000 (08:36 +0000)]
Append CFLAGS and HOSTCFLAGS to environment

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
6 years agoAdd error checking to all file functions
Loïc Minier [Mon, 21 Feb 2011 08:29:29 +0000 (08:29 +0000)]
Add error checking to all file functions

When building with a fortify-enabled toolchain, one would get:
scripts/signGP.c:305:8: warning: ignoring return value of \91fread\92, declared with attribute warn_unused_result

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
6 years agoRemoved some dead code
Loïc Minier [Mon, 21 Feb 2011 08:27:50 +0000 (08:27 +0000)]
Removed some dead code

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
6 years agoReplace die() with pdie() and err() macros
Loïc Minier [Mon, 21 Feb 2011 08:27:12 +0000 (08:27 +0000)]
Replace die() with pdie() and err() macros

err() saves errno for pdie() to perror() the actual strerror() issue.

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
6 years agoSend errors to stderr
Loïc Minier [Mon, 21 Feb 2011 08:25:07 +0000 (08:25 +0000)]
Send errors to stderr

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
6 years agoAdd a die() macro to exit with an error message
Loïc Minier [Mon, 21 Feb 2011 08:24:14 +0000 (08:24 +0000)]
Add a die() macro to exit with an error message

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
6 years agoAdd -marm -fno-stack-protector to CFLAGS on ARM
Loic Minier [Mon, 21 Feb 2011 08:22:02 +0000 (08:22 +0000)]
Add -marm -fno-stack-protector to CFLAGS on ARM

The Linaro-based arm-linux-gnueabi cross-compiler in Ubuntu defaults to
Thumb 2 and enables the stack protector by default, both of which can
break x-loader at runtime (the former breaks the build).

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
6 years agoxloader: unification change version string
Andy Green [Sun, 20 Feb 2011 08:58:58 +0000 (08:58 +0000)]
xloader: unification change version string

bump the version number and add a tag "unified"
so it's easier for people to figure out what their
"MLO" is

Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoxloader: unification more merge cleaning allowing
Andy Green [Sun, 20 Feb 2011 08:58:57 +0000 (08:58 +0000)]
xloader: unification more merge cleaning allowing
omap4430panda config to build cleanly to a working
MLO

Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoxloader: unification fixup bulk of merge conflicts
Andy Green [Sun, 20 Feb 2011 07:49:41 +0000 (07:49 +0000)]
xloader: unification fixup bulk of merge conflicts

This patch cleans the merge action of bringing in the git.omapzoom.org
x-loader tree on top of the gitorious tree, unifying the two trees.

From: Andy Green <andy.green@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoomap4: dss: enable clocks
Vikram Pandita [Tue, 8 Feb 2011 23:30:05 +0000 (15:30 -0800)]
omap4: dss: enable clocks

Keep DSS clocks enabled.
Its seen on panda that clock_enable/disable has issues.
So keep the DSS clocks enabled in xloader.

Kernel will make sure these will get disabled eventually.

Also in near future there will be a need to have DSS working
in bootloader to show some fastboot texts. So enable DSS.

Change-Id: If29777852097f170f5235165a524cd718a01866a
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
6 years agoxloader: Panda - clean remove all magic constant addresses and use symbols
Andy Green [Wed, 9 Feb 2011 14:47:04 +0000 (14:47 +0000)]
xloader: Panda - clean remove all magic constant addresses and use symbols

Go through and eliminate magic constant addresses in the OMAP4 /
Pandaboard code by providing symbolic ones.

This also allows removal of a bunch of comments trying to note
the register names separately.

Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoxloader: Panda - clean small refactors and hang with spam_leds
Andy Green [Wed, 9 Feb 2011 14:46:34 +0000 (14:46 +0000)]
xloader: Panda - clean small refactors and hang with spam_leds

Get rid of do loops where while is simpler.
Lose some indent with return.
Change hang loop to use spam_leds(), it's no worse
  even if mux wasn't set up.

Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoxloader: Panda - kill OTG and reset PHY in case ROM started them
Andy Green [Wed, 9 Feb 2011 14:46:03 +0000 (14:46 +0000)]
xloader: Panda - kill OTG and reset PHY in case ROM started them

It'd be better if we didn't let the OS or next bootloader
see that the ROM set things up differently than usual.

Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoxloader: Panda - return memif clock to HW_AUTO after DPLL set
Andy Green [Wed, 9 Feb 2011 14:45:40 +0000 (14:45 +0000)]
xloader: Panda - return memif clock to HW_AUTO after DPLL set

As advised by Aneesh V we return that clock to HW_AUTO after meddling
for DDR bringup.

Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoxloader: Panda - fix ROM OTG boot path
Andy Green [Wed, 9 Feb 2011 14:45:14 +0000 (14:45 +0000)]
xloader: Panda - fix ROM OTG boot path

When the OMAP 4 on Panda sees that USB OTG external power is present,
it changes the boot flow in the ROM to try to boot via that before
trying MMC1.  If it isn't satisfied, it falls through to try MMC1.

Without this patch, under those conditions X-Loader is unable to
update the DPLL as it needs to do during dram initialization, because
the EMIF never goes idle allowing the shadow update mechanism to
apply the new settings.

It therefore loops for a long period waiting to confirm the settings
applied and boot is hung (with LEDs off, so the device looks OFF).

This patch re-enables EMIF idle which was previously commented out with
"No IDLE: BUG in SDC" to allow the new DPLL settings to apply.

With the patch against http://gitorious.org/x-loader HEAD the Panda is
able to boot from either USB OTG power applied or DC Jack power OK.

Note that I saw peak current during boot of 650mA, higher than the
500mA allowed by USB.  It may go higher with other peripherals enabled
or trying to use USB host on Panda.

Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoxloader: Panda - add led flashing debug code
Andy Green [Wed, 9 Feb 2011 14:44:47 +0000 (14:44 +0000)]
xloader: Panda - add led flashing debug code

I found this useful during debugging failure of xloader before
serial had come up on Panda.

Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoxloader: Panda - add Omap4 gpio base
Andy Green [Wed, 9 Feb 2011 14:44:30 +0000 (14:44 +0000)]
xloader: Panda - add Omap4 gpio base

We don't seem to have the GPIO bases available.  This
patch adds the ones we will use.

Signed-off-by: Andy Green <andy.green@warmcat.com>
6 years agoxloader: Panda - clean eliminate volatile temps
Andy Green [Wed, 9 Feb 2011 14:44:08 +0000 (14:44 +0000)]
xloader: Panda - clean eliminate volatile temps

The Omap4 hsmmc code has three instances of volatile
temps that are not necessary.

Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoxloader: Panda - refactor mux define into struct array
Andy Green [Wed, 9 Feb 2011 14:43:44 +0000 (14:43 +0000)]
xloader: Panda - refactor mux define into struct array

There's a giant #define that is just unrolled code to
write a constant to a constant address.

This patch converts the address and data content to be
an array of structs, and changed the mux init code
to walk through the array doing the writes.

Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoxloader: Panda - remove commented cruft
Andy Green [Wed, 9 Feb 2011 14:43:25 +0000 (14:43 +0000)]
xloader: Panda - remove commented cruft

There's quite a lot of dead commented code that can be
recovered from git if it is needed again.

Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoxloader: Panda - convert explicit volatile rw to __raw_xx
Andy Green [Wed, 9 Feb 2011 14:43:08 +0000 (14:43 +0000)]
xloader: Panda - convert explicit volatile rw to __raw_xx

There were a ton of explicit volatile address to pointer
casts and such.  This converts them all to __raw_[read|write][l|w]
and in the process makes checkpatch much happier

Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoxloader: Panda - enable Werror
Andy Green [Wed, 9 Feb 2011 14:42:35 +0000 (14:42 +0000)]
xloader: Panda - enable Werror

It is pointless having -Wall without -Werror.  Now that
the warnings are cleaned out, enable -Werror for the
panda config.

Now you're gonna have to attend to any compiler warnings...

Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoxloader: Panda - clean compile warnings
Andy Green [Wed, 9 Feb 2011 14:42:15 +0000 (14:42 +0000)]
xloader: Panda - clean compile warnings

Visit each warning during panda config clean build and
fix them. (This is true for gcc 4.5.1 compiler anyway)

Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoxloader: Panda - bugfix mux redefinition different values
Andy Green [Wed, 9 Feb 2011 14:41:55 +0000 (14:41 +0000)]
xloader: Panda - bugfix mux redefinition different values

CONTROL_PADCONF_WAKEUPEVENT_0 is defined twice in the mux.h header

Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoxloader: Panda - bugfix board hang function doesn't hang
Andy Green [Wed, 9 Feb 2011 14:41:21 +0000 (14:41 +0000)]
xloader: Panda - bugfix board hang function doesn't hang

Given this code is meant to 'hang', I am guessing the author
wanted a while (1) ; in there

Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoxloader: Panda - bugfix missing while body
Andy Green [Wed, 9 Feb 2011 14:40:50 +0000 (14:40 +0000)]
xloader: Panda - bugfix missing while body

It looks like there is a missing ; that brings the following sr32
into the loop body.  That probably wasn't intentional and could
lead to unreliable ordering of the completion check and possibly
no sr32 following completion.

Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoxloader: Panda - clean board files style
Andy Green [Wed, 9 Feb 2011 14:40:20 +0000 (14:40 +0000)]
xloader: Panda - clean board files style

Solve checkpatch in ./board/omap4430panda/* and ./cpu/omap4

Ignore volatile warnings and mux define crap because it will
be solved in following patches separately

Signed-off-by: Andy Green <andy.green@linaro.org>
6 years agoOMAP4: x-loader: Adjust LPDDR2 CONTROL IO settings for ES2.x
Cedric Vamour [Tue, 8 Feb 2011 18:15:24 +0000 (12:15 -0600)]
OMAP4: x-loader: Adjust LPDDR2 CONTROL IO settings for ES2.x

Disable Internal VREF manual control allowing to reduce leakage
while Core transitons in OSWR. Adjust Drive Strength and Slew Rate
of LPDDR2 Control IO for ES2.2 as suggested by Design team.

Change-Id: Iea151d0b29f5bbdc58d7a2b00e6240c69be31c30
Signed-off-by: Cedric Vamour <c-vamour@ti.com>
Signed-off-by: Madhusudhan Chikkature <madhu.cr@ti.com>
Signed-off-by: Dan Murphy <dmurphy@ti.com>
6 years agogpio: enable gpio bank4 access
Vikram Pandita [Fri, 28 Jan 2011 22:38:53 +0000 (14:38 -0800)]
gpio: enable gpio bank4 access

GPIO-121 lies in GPIO bank4.
This is needed on panda board to detect the GPIO_121 button press

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
6 years agoOMAP4: drive DPLL_ABE from sys_ck, temporarily
Mike Turquette [Fri, 28 Jan 2011 20:32:37 +0000 (14:32 -0600)]
OMAP4: drive DPLL_ABE from sys_ck, temporarily

Currently, driving DPLL_ABE from the 32KHz clock is gating ABE power domain
transitions and preventing DEVICE OFF.  Until this is fixed, revert back to
driving DPLL_ABE from SYS_CK.

Change-Id: I6fe5d2d9ede6e820df1e15b805751537a47e8640
Signed-off-by: Mike Turquette <mturquette@ti.com>
6 years agoOMAP4: bring back code to run DPLL_ABE from sys_ck
Mike Turquette [Fri, 28 Jan 2011 20:28:47 +0000 (14:28 -0600)]
OMAP4: bring back code to run DPLL_ABE from sys_ck

Conditionally program CM_ABE_PLL_REF_CLKSEL based on CONFIG_OMAP4_ABE_SYSCK
option, and bring back two clock divider settings that were mistakenly
removed.

Change-Id: I050bf420e8f7e0ce0981e190b613db64c7f39cc5
Signed-off-by: Mike Turquette <mturquette@ti.com>
6 years agoovero: Fix bug in prcm_init
Steve Sakoman [Fri, 28 Jan 2011 19:22:29 +0000 (00:52 +0530)]
overo: Fix bug in prcm_init

The overo get_cpu_rev function was extended when 37XX support was
added, but I neglected to modify the index calculation in prcm_init
to compensate.

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Tested-by: Philip Balister <philip@opensdr.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
6 years agoSupport for ES2.2 pandaboard
Sebastien Jan [Fri, 28 Jan 2011 19:22:21 +0000 (00:52 +0530)]
Support for ES2.2 pandaboard

Mostly inspired from Dan Murphy's patch on dev.omapzoom.org
x-loader tree:
    X-Loader: Change for the ES2.2 support

    Modified the OMAP revision code to only compare
    the upper nibble of the most significant byte as this
    denotes the OMAP revision.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Sebastien Jan <s-jan@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
6 years agoomap4430panda: enable clock gating for M6_DPLL_CORE
Aaron Carroll [Fri, 28 Jan 2011 19:22:12 +0000 (00:52 +0530)]
omap4430panda: enable clock gating for M6_DPLL_CORE

The M6 clock from the core DPLL supplies a clock to the debug domain.
After the core DPLL is locked, the M6 clock appears to stop if clock
gating has been *disabled* for that output (reason unknown).  This
breaks JTAG debugging.

This patch enables clock gating on M6_DPLL_CORE before locking the
core DPLL, so the debugger continues to work.

Signed-off-by: Aaron Carroll <aaronc@cse.unsw.edu.au>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
6 years agosdram: correct delay after ZQINIT
Richard Woodruff [Fri, 28 Jan 2011 10:13:38 +0000 (15:43 +0530)]
sdram: correct delay after ZQINIT

The delay given while waiting for ZQINIT command to finish is not
adequate considering the MPU speed. Correcting this.

Signed-off-by: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Aneesh V <aneesh@ti.com>
6 years agoOMAP4: x-loader: Fixed DDR ZQ calibration sequence in bootloader
Cedric Vamour [Thu, 27 Jan 2011 20:45:30 +0000 (14:45 -0600)]
OMAP4: x-loader: Fixed DDR ZQ calibration sequence in bootloader

Initial calibration must be requested 1st through ZQInit / MR10
Periodical calibration must be requested after ZQInit completion
on both CS0 and CS1: enable both #31 and #30 bits from ZQConfig

Change-Id: I3ecdae65d747f2930baead84e299c209c21a11f0
Signed-off-by: Dan Murphy <dmurphy@ti.com>
6 years agogitignore: be explicit for x-load files
Nishanth Menon [Wed, 26 Jan 2011 14:04:35 +0000 (19:34 +0530)]
gitignore: be explicit for x-load files

As discussed in thread:
http://groups.google.com/group/x-loader/browse_thread/thread/bf17e22c9628c630
x-load.lds file gets ignored by having x-load.*
as a coverall. we should ignore just the x-load, and corresponding
.map and .bin files alone.

Reported by: Enric Balletbo i Serra <eballetbo@gmail.com>

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
6 years agosignGP: dont add Config header for all devices
Nishanth Menon [Wed, 26 Jan 2011 14:04:32 +0000 (19:34 +0530)]
signGP: dont add Config header for all devices

Configuration Header is not needed for OMAP3, but needed
on Panda. To allow co-existance, introduce CONFIG_HEADER
to enable it when doing make ift

Tested on: Beagle XM rev A, Pandaboard rev EA1.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
6 years agoMakefile: remove TEXT_BASE
Nishanth Menon [Wed, 26 Jan 2011 14:04:29 +0000 (19:34 +0530)]
Makefile: remove TEXT_BASE

TEXT_BASE comes from config.mk - dont need to hackup here.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
6 years agoIGEPV2: Fixing Makefile to properly save objects in a different path
Ricardo Salveti de Araujo [Wed, 26 Jan 2011 13:59:55 +0000 (19:29 +0530)]
IGEPV2: Fixing Makefile to properly save objects in a different path

Now it follows the same as we have with other boards.

Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
6 years agoOMAP3: Add support for the IGEP v2 board.
Enric Balletbo i Serra [Mon, 24 Jan 2011 08:51:53 +0000 (14:21 +0530)]
OMAP3: Add support for the IGEP v2 board.

The IGEP v2 board is a low-cost, fan-less and industrial temperature
range single board computer that unleashes laptop-like performance and
expandability without the bulk, expense, or noise of typical desktop
machines. Its architecture shares much in common with other OMAP3 boards.

Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
6 years agoonenand|ddr: Add support for M39B0Rx0xxN1 Numonyx POP device
Enric Balletbo i Serra [Mon, 24 Jan 2011 08:47:30 +0000 (14:17 +0530)]
onenand|ddr: Add support for M39B0Rx0xxN1 Numonyx POP device

The M39B0Rx0xxN1 combines the following memory devices in MCP (multichip package):
  * 2-Gbit (x16), 1.8 V OneNANDTM flash memory, the NAND02GR4E0A
  * 4-Gbit DDP (DUAL DIE PLAN) (x16), 1.8 V OneNANDTM flash memory, the
    NAND04GR4E1A
  * Two or one single die of 2-Gbit double data rate LPSDRAM (low-power SDRAM), the
    M65KD002AM.

The datasheets are available from your local Numonyx distributor.

Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
6 years agoOMAP4: drive DPLL_ABE from 32KHz instead of SYS_CK
Mike Turquette [Tue, 18 Jan 2011 00:34:05 +0000 (18:34 -0600)]
OMAP4: drive DPLL_ABE from 32KHz instead of SYS_CK

Changes the parent of DPLL_ABE to 32KHz timer instead of SYS_CK.
Configures the DPLL for low power mode, sets REGM4XEN bit (for 4x
multiplier to MN dividers) and sets MN diviers to 750 and 0 respectively
to achieve 196.608MHz.

Patch also corrects boundary issues when writing N value to CLKSEL
register and removes two redundant writes to PRCM.

Change-Id: I68104d39bd320a23b914cf32a01618d117d52f5d
Signed-off-by: Mike Turquette <mturquette@ti.com>
7 years agoOMAP4: Add sd_div to dpll_param structure and set sd_div field for USB DPLL
Jon Hunter [Thu, 13 Jan 2011 13:47:02 +0000 (07:47 -0600)]
OMAP4: Add sd_div to dpll_param structure and set sd_div field for USB DPLL

According to the OMAP4430 TRM the DPLL_SD_DIV field (sigma delta
divider) in the CM_CLKSEL_DPLL_USB must be set to ensure optimal
jitter performance. Therefore, add a field to the dpll_param
structure and set this field for the USB DPLL.

Change-Id: Id1a5aaa9c39d0bdc5ca35b890606c73b6c7e3601
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Dan Murphy <dmurphy@ti.com>
7 years agox-loader:omap4430panda: configure mcbsp1 pins
Srinivas Lakshminarayana [Tue, 11 Jan 2011 06:40:40 +0000 (12:10 +0530)]
x-loader:omap4430panda: configure mcbsp1 pins

The pins intended for McBSP1 Clock/DX was configured for Slimbus,
Now configure it for McBSP - Since McBSP1 is connected to BT-PCM
which is made use in BT headset/handsfree profile for voice
through BT_VX_DL via ABE.

Signed-off-by: Srinivas Lakshminarayana <x0145110@ti.com>
7 years agoX-Loader: Change for the ES2.2 support
Dan Murphy [Thu, 6 Jan 2011 13:42:38 +0000 (07:42 -0600)]
X-Loader: Change for the ES2.2 support

Modified the OMAP revision code to only compare
the upper nibble of the most significant byte as this
denotes the OMAP revision.

Change-Id: I90a6a9954dbe8fc336b7d500f6635cde807d7c15
Signed-off-by: Dan Murphy <dmurphy@ti.com>
7 years agoomap4: bootloader start address change
Vikram Pandita [Thu, 6 Jan 2011 01:32:52 +0000 (17:32 -0800)]
omap4: bootloader start address change

As per new emmc partition sizes, bootloader starts at 0x200
0x200 = Start Sector for bootloader (512 in following table)

Number  Start (sector)    End (sector)  Size       Code  Name
   1             256             511   128.0 KiB   0700  xloader
   2             512            1023   256.0 KiB   0700  bootloader

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
7 years agoES2.1 Panda support for SDRAM
Aneesh V [Fri, 10 Dec 2010 07:23:21 +0000 (12:53 +0530)]
ES2.1 Panda support for SDRAM

Have common initialization for SDRAM as all OMAP4 boards today
are using same memory parts(for a given silicon revision)

Change-Id: I86f04310
Signed-off-by: Aneesh V <aneesh@ti.com>
7 years agoMerge "Updated TI copyrighted syslib.c to be BSD licensed instead of GPLv2" into...
Keith Deacon [Mon, 3 Jan 2011 00:13:05 +0000 (00:13 +0000)]
Merge "Updated TI copyrighted syslib.c to be BSD licensed instead of GPLv2" into omap4_dev

7 years agoMerge "omap4: fix peripheral boot crash" into omap4_dev
Vikram Pandita [Fri, 24 Dec 2010 07:36:23 +0000 (07:36 +0000)]
Merge "omap4: fix peripheral boot crash" into omap4_dev

7 years agoomap1: remove support for 1710 and 1510
Nishanth Menon [Thu, 23 Dec 2010 09:44:41 +0000 (15:14 +0530)]
omap1: remove support for 1710 and 1510

Remove support of 1710 H3 platform and 1510 - there are no
active maintainers or interest in maintaining these platforms.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
7 years agoAdd Maintainer file
Nishanth Menon [Tue, 21 Dec 2010 19:26:32 +0000 (13:26 -0600)]
Add Maintainer file

This will allow us to have official maintainers per platform
who will be able to help in case of issues relevant to the
platform

Signed-off-by: Nishanth Menon <nm@ti.com>
7 years agoAdding support for saving build objects in a separated directory.
Ricardo Salveti de Araujo [Mon, 20 Dec 2010 13:30:27 +0000 (11:30 -0200)]
Adding support for saving build objects in a separated directory.

This patch basically ports the same functionality already available at u-boot,
and can be used in two ways:
 1) Add O= to the make command line
    'make O=/tmp/build board_config'
    'make O=/tmp/build ift'

 2) Set environement variable BUILD_DIR to point to the desired location
    'export BUILD_DIR=/tmp/build'
    'make board_config'
    'make ift'

Similar to u-boot, setting 'O=' at the command line will override the BUILD_DIR
environment variable.

If you use none of above methods, the build will happen localy, as before.

Changes since v1:
 * Rebase to correctly apply against the main Makefile after the signGP merge

Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
Acked-by: Nishanth Menon <nm@ti.com>
7 years agoscripts: signGP: properly returning 1 in case of errors
Ricardo Salveti de Araujo [Mon, 20 Dec 2010 13:23:18 +0000 (11:23 -0200)]
scripts: signGP: properly returning 1 in case of errors

Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
Acked-by: Nishanth Menon <nm@ti.com>
7 years agoUpdated TI copyrighted syslib.c to be BSD licensed instead of GPLv2
Keith Deacon [Thu, 23 Dec 2010 00:10:41 +0000 (18:10 -0600)]
Updated TI copyrighted syslib.c to be BSD licensed instead of GPLv2

7 years agoscripts: signGP: add spaces for better readability
Felipe Balbi [Wed, 15 Dec 2010 12:28:18 +0000 (14:28 +0200)]
scripts: signGP: add spaces for better readability

it's better to read when we follow Linux Kernel
CodingStyle.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
7 years agoscripts: signGP: mark struct as static
Felipe Balbi [Wed, 15 Dec 2010 12:28:17 +0000 (14:28 +0200)]
scripts: signGP: mark struct as static

that will never be used outside this file
anyway.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
7 years agoMakefile: enable warnings and debugging symbols
Felipe Balbi [Wed, 15 Dec 2010 12:28:16 +0000 (14:28 +0200)]
Makefile: enable warnings and debugging symbols

... when compiling signGP.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
7 years agoscripts: signGP: fix up main() prototype
Felipe Balbi [Wed, 15 Dec 2010 12:28:15 +0000 (14:28 +0200)]
scripts: signGP: fix up main() prototype

... also add a return statement to a function
returning int.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
7 years agoscripts: signGP: get rid of C++ style comments
Felipe Balbi [Wed, 15 Dec 2010 12:28:14 +0000 (14:28 +0200)]
scripts: signGP: get rid of C++ style comments

convert // to /* */ comments.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
7 years agoscripts: signGP: Add GPL header
Felipe Balbi [Wed, 15 Dec 2010 12:28:13 +0000 (14:28 +0200)]
scripts: signGP: Add GPL header

Add the generic GPL header to signGP.c file.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
7 years agoomap4: fix peripheral boot crash
Vikram Pandita [Sat, 18 Dec 2010 02:05:22 +0000 (18:05 -0800)]
omap4: fix peripheral boot crash

Any peripheral boot attempt will crash on omap4.
Wrong offsets are getting accessed which is only valid for memory boot

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
7 years agoGenerate MLO file with Makefile ift option
Vikram Pandita [Tue, 10 Feb 2009 20:55:35 +0000 (14:55 -0600)]
Generate MLO file with Makefile ift option

MLO is the file name used for MMC booting.
Make that as default file generated with
make ift

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
7 years agoX-loader: add gitignore
Nishanth Menon [Sat, 11 Dec 2010 23:21:59 +0000 (17:21 -0600)]
X-loader: add gitignore

it is kind of irritating to get much git status
for object files

Signed-off-by: Nishanth Menon <nm@ti.com>
7 years agoSignGP: add CH support
Aneesh V [Thu, 22 Jul 2010 06:17:30 +0000 (11:47 +0530)]
SignGP: add CH support

Configuration Header is attached as part of the 'make ift' step.
After this, same MLO will work for both eMMC and external MMC boot.

Signed-off-by: Aneesh V <aneesh@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
7 years agoUpdated specific TI files to be BSD licensed instead of GPLv2
Keith Deacon [Tue, 14 Dec 2010 04:45:38 +0000 (22:45 -0600)]
Updated specific TI files to be BSD licensed instead of GPLv2

7 years agoX-Loader: Add SignGP support
Nishanth Menon [Sat, 11 Dec 2010 23:18:45 +0000 (17:18 -0600)]
X-Loader: Add SignGP support

Integrate signGP from
http://beagleboard.googlecode.com/files/signGP.c

This will allow:
make ift to generate the ift file

Signed-off-by: Nishanth Menon <nm@ti.com>
7 years agoFAT: cast proper strings
Nishanth Menon [Wed, 8 Dec 2010 22:40:26 +0000 (16:40 -0600)]
FAT: cast proper strings

Bunch of __u8 *s being passed on to char * function. thanks to the typedef
madness, this generates a bunch of warnings which make not much sense
as __u8 * and char * are essentially operated like characters!

quick fix by recasting them.
Fixes:
fat.c: In function 'do_fat_read':
fat.c:697:5: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness
fat.c:69:8: note: expected 'char *' but argument is of type '__u8 *'
fat.c:698:5: warning: pointer targets in passing argument 1 of 'downcase' differ in signedness
fat.c:40:1: note: expected 'char *' but argument is of type '__u8 *'
fat.c:705:5: warning: pointer targets in passing argument 1 of 'dirdelim' differ in signedness
fat.c:165:1: note: expected 'char *' but argument is of type '__u8 *'
fat.c:708:10: warning: pointer targets in assignment differ in signedness
fat.c:778:6: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness
fat.c:78:5: note: expected 'const char *' but argument is of type '__u8 *'
fat.c:778:6: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness
fat.c:78:5: note: expected 'const char *' but argument is of type '__u8 *'

Signed-off-by: Nishanth Menon <nm@ti.com>
7 years agoFAT: return NULL from get_dentfromdir
Nishanth Menon [Wed, 8 Dec 2010 22:35:12 +0000 (16:35 -0600)]
FAT: return NULL from get_dentfromdir

get_dentfromdir should return NULL if it has nothing to do.
Fixes:
fat.c: In function 'get_dentfromdir':
fat.c:461:1: warning: no return statement in function returning non-void

Signed-off-by: Nishanth Menon <nm@ti.com>
7 years agoFat: remove unused stuff
Nishanth Menon [Wed, 8 Dec 2010 22:31:13 +0000 (16:31 -0600)]
Fat: remove unused stuff

variable i and the static function slot2str are unused
in fat.c anymore. remove them

Fixes:
fat.c: In function 'get_fatent':
fat.c:261:17: warning: unused variable 'i'
fat.c: At top level:
fat.c:440:1: warning: 'slot2str' defined but not used

Signed-off-by: Nishanth Menon <nm@ti.com>
7 years agoFAT: use casts for initialization
Nishanth Menon [Wed, 8 Dec 2010 22:26:01 +0000 (16:26 -0600)]
FAT: use casts for initialization

Couple of variable initalization require proper casts for type conversions
Fixes Warnings:
fat.c: In function 'get_fatent':
fat.c:258:18: warning: initialization from incompatible pointer type

fat.c: At top level:
fat.c:665:19: warning: initialization makes pointer from integer without a cast
fat.c:666:27: warning: initialization makes pointer from integer without a cast

Signed-off-by: Nishanth Menon <nm@ti.com>
7 years agoomap4: clock: initialize dpll_param_p with default
Nishanth Menon [Wed, 8 Dec 2010 22:22:11 +0000 (16:22 -0600)]
omap4: clock: initialize dpll_param_p with default

dpll_param_p could in theory be used un-initialized with unsupported
silicon version. quick fix by providing 0 as a value which should
prevent boot on an unsupported silicon rather than boot with random
value

Fixes warnings:
clock.c: In function 'configure_core_dpll_no_lock':
clock.c:381:14: warning: 'dpll_param_p' may be used uninitialized in this function
clock.c: In function 'lock_core_dpll_shadow':
clock.c:443:14: warning: 'dpll_param_p' may be used uninitialized in this function

Signed-off-by: Nishanth Menon <nm@ti.com>
7 years agoOMAP4: Setup POR and aux_ctrl based on device type
Vikram Pandita [Thu, 9 Dec 2010 00:00:42 +0000 (16:00 -0800)]
OMAP4: Setup POR and aux_ctrl based on device type

PPA does not exist for GP devices, so introduce the change
specifically for HS/EMU devices

[nm@ti.com: split the original patch up with minor change]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Carlos Leija <cileija@ti.com>
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
7 years agoomap4: secure monitor calls: abstract to common file
Carlos Leija [Wed, 8 Dec 2010 02:48:55 +0000 (20:48 -0600)]
omap4: secure monitor calls: abstract to common file

Instead of hand coding assembly into the function, introduce
abstraction apis to call ROM Code's Secure Monitor Calls.
As part of this change, OMAP44XX_PL310_AUX_CTRL has been introduced
to define the register base instead of hardcoding it in.

[nm@ti.com: Split the original patch up to be digestible ;)]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Carlos Leija <cileija@ti.com>
7 years agoomap4: cpu: remove few OMAP3 defines
Carlos Leija [Wed, 8 Dec 2010 02:01:47 +0000 (20:01 -0600)]
omap4: cpu: remove few OMAP3 defines

OMAP44XX_MCR CONTROL_SCALABLE_OMAP_STATUS CONTROL_SCALABLE_OMAP_OCP
are used on OMAP3, but not on OMAP4 - remove them.

[nm@ti.com: split the original patch up with minor change]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Carlos Leija <cileija@ti.com>
7 years agoomap4: revision: use CONTROL_ID_CODE for OMAP4
Carlos Leija [Wed, 8 Dec 2010 01:59:34 +0000 (19:59 -0600)]
omap4: revision: use CONTROL_ID_CODE for OMAP4

Define CONTROL_ID_CODE and use it to detect the logic better

[nm@ti.com: split the original patch up with minor change]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Carlos Leija <cileija@ti.com>
7 years agoomap4: introduce get_device_type
Carlos Leija [Wed, 8 Dec 2010 01:50:56 +0000 (19:50 -0600)]
omap4: introduce get_device_type

We'd want to use get_device_type as defined in sysproto.h to be able
to runtime operate on GP and EMU devices. Comparison can be done
against TST_DEVICE EMU_DEVICE HS_DEVICE GP_DEVICE in cpu.h

CONTROL_STATUS register points at the wrong offset - fix it to
make this work.

[nm@ti.com: split the original patch up with minor tweaks]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Carlos Leija <cileija@ti.com>
7 years agoomap4: ctrl: use OMAP44XX_CTRL_GEN_BASE
Carlos Leija [Wed, 8 Dec 2010 01:43:06 +0000 (19:43 -0600)]
omap4: ctrl: use OMAP44XX_CTRL_GEN_BASE

OMAP4 TRM has two SYSCTRL registers -
SYSCTRL_GENERAL_CORE pointing to 0x4a002000
and
SYSCTRL_PADCONF_CORE pointing to 0x4a100000

we redifine OMAP44XX_CTRL_BASE to OMAP44XX_CTRL_GEN_BASE to show
the difference

[nm@ti.com: minor naming changes]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Carlos Leija <cileija@ti.com>
7 years agoomap4: mux: use OMAP44XX_CTRL_PADCONF_CORE_BASE
Carlos Leija [Wed, 8 Dec 2010 01:38:08 +0000 (19:38 -0600)]
omap4: mux: use OMAP44XX_CTRL_PADCONF_CORE_BASE

OMAP4 TRM has two SYSCTRL registers -
SYSCTRL_GENERAL_CORE pointing to 0x4a002000
and
SYSCTRL_PADCONF_CORE pointing to 0x4a100000

for some reason the OMAP44XX_CTRL_BASE was being used
as the padconf base - fix it!

[nm@ti.com: minor naming changes]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Carlos Leija <cileija@ti.com>
7 years agoomap4: mux: make the reg access macro common
Nishanth Menon [Wed, 8 Dec 2010 01:32:41 +0000 (19:32 -0600)]
omap4: mux: make the reg access macro common

panda and sdp seem to define the same sets of macros
make them generic in mux.h which is included in board files

Signed-off-by: Nishanth Menon <nm@ti.com>
7 years agoFix reading FAT32 root dirs that span >1 cluster
Nick Gasson [Sat, 13 Nov 2010 18:57:35 +0000 (18:57 +0000)]
Fix reading FAT32 root dirs that span >1 cluster

Unlike FAT12/16, FAT32 does not guarantee that root directories will
occupy consecutive clusters. To get each cluster after the first you
must access the FAT as with any other directory. This patch implements
this and bumps up the largest valid cluster number to support large
e.g. 64MB partitions.

Signed-off-by: Nick Gasson <nick@nickg.me.uk>
[original patch: http://www.sakoman.com/cgi-bin/gitweb.cgi?p=x-loader.git;a=commitdiff;h=16d9259cc980c7f3a3778431349dcbbf97a7ec82]

7 years agoFAT: partition fix
Laine Walker-Avina [Tue, 13 Apr 2010 20:27:31 +0000 (13:27 -0700)]
FAT: partition fix

Find the start of the first partition in a non-hardcoded way

[Original Patch: http://gitorious.org/pandaboard/rsalveti-x-loader/commit/9e4650afa847b23c8e1eab200bff95450367fa56]

Signed-off-by: Laine Walker-Avina <lwalkera@ieee.org>
7 years agoomap4: kill usage of *(volatile int*)
Nishanth Menon [Tue, 7 Dec 2010 20:20:50 +0000 (14:20 -0600)]
omap4: kill usage of *(volatile int*)

use __raw_readl and __raw_writel instead.

Signed-off-by: Nishanth Menon <nm@ti.com>
7 years agoEnable POR bit via ppa service
Leija, Carlos [Tue, 30 Nov 2010 16:47:48 +0000 (08:47 -0800)]
Enable POR bit via ppa service
Enable Data prefetch

Signed-off-by: Leija, Carlos <cileija@ti.com>
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
7 years agoFix reading FAT32 root dirs that span >1 cluster
Nick Gasson [Sat, 13 Nov 2010 18:57:35 +0000 (18:57 +0000)]
Fix reading FAT32 root dirs that span >1 cluster

Unlike FAT12/16, FAT32 does not guarantee that root directories will
occupy consecutive clusters. To get each cluster after the first you
must access the FAT as with any other directory. This patch implements
this and bumps up the largest valid cluster number to support large
e.g. 64MB partitions.

7 years agox-loader: fix Blaze boot problem in specific sys_boot modes
Aneesh V [Wed, 17 Nov 2010 12:43:36 +0000 (18:13 +0530)]
x-loader: fix Blaze boot problem in specific sys_boot modes

x-loader crashes when booted with SYS_BOOT[5:0]=010110
and USB cable connected on Blaze.

This is because in this sequence the EMIF modules were not clocked.
Normally, EMIF modules are clocked on power on reset.

The issue is solved by doing prcm_init before ddr_init

Signed-off-by: Aneesh V <aneesh@ti.com>
7 years agox-loader: enable i-cache in x-loader
Aneesh V [Fri, 12 Nov 2010 09:50:39 +0000 (15:20 +0530)]
x-loader: enable i-cache in x-loader

Signed-off-by: Aneesh V <aneesh@ti.com>
7 years agoBeagle: Support C4 from Special Computing (with Numonyx DDR/NAND)
Steve Sakoman [Wed, 3 Nov 2010 16:56:40 +0000 (09:56 -0700)]
Beagle: Support C4 from Special Computing (with Numonyx DDR/NAND)

7 years agoomap4: Fix pin mux configuration for McBSP1
Misael Lopez Cruz [Thu, 21 Oct 2010 22:40:00 +0000 (17:40 -0500)]
omap4: Fix pin mux configuration for McBSP1

Fix pin mux settings for McBSP1_CLKX and McBSP1_DR for
Blaze/SDP4430 boards.

Change-Id: I54e58dcb77af57c4f37f8e8bc5e42b7b1a1fdcd0
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
7 years agoPanda: Sync ES2.1 changes
Steve Sakoman [Sat, 30 Oct 2010 15:09:45 +0000 (08:09 -0700)]
Panda: Sync ES2.1 changes

7 years agoOMAP4: Select DPLL PER Clock as source for SGX FCLK
Rajeev Kulkarni [Tue, 26 Oct 2010 12:34:43 +0000 (07:34 -0500)]
OMAP4: Select DPLL PER Clock as source for SGX FCLK

The correct frequncy for SGX is 307.2 Mhz.. If DPLL_PER
is set 1536 Mhz, There is no need to change dividers, just
parent clock need to change. And DPLL PER is set at 1536.

Signed-off-by: Rajeev Kulkarni <rajeevk@ti.com>
7 years agoX-loader: omap4 v2: es2.1: 400 MHz for 1GB
Santosh Shilimkar [Tue, 28 Sep 2010 12:49:03 +0000 (18:19 +0530)]
X-loader: omap4 v2: es2.1: 400 MHz for 1GB

Update x-loader for ES 2.1 support

Corrected: lock_core_dpll_shadow function for dpll400

Signed-off-by: sebastien Guiriec <s-guiriec@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
7 years agoOvero: Add support for Hynix POP (512MB DDR, 512MB NAND)
Steve Sakoman [Wed, 13 Oct 2010 02:05:03 +0000 (19:05 -0700)]
Overo: Add support for Hynix POP (512MB DDR, 512MB NAND)

7 years agoRevert "Panda: Use proper VCORE3 settings for ES2.1"
Steve Sakoman [Thu, 7 Oct 2010 19:48:20 +0000 (12:48 -0700)]
Revert "Panda: Use proper VCORE3 settings for ES2.1"

This reverts commit b718a9a320138daf9d799f91c2d0d7a440b6c6c4.

Mistakenly applied.

7 years agoPanda: Use proper VCORE3 settings for ES2.1
Steve Sakoman [Thu, 7 Oct 2010 16:37:17 +0000 (09:37 -0700)]
Panda: Use proper VCORE3 settings for ES2.1

This patch based on work by Ricardo Salveti de Araujo and Rob Clark
with help of some other TI folks.

7 years agoOMAP4: clocks: Disable slimbus and pad_clks
Rajendra Nayak [Mon, 4 Oct 2010 13:19:18 +0000 (18:49 +0530)]
OMAP4: clocks: Disable slimbus and pad_clks

The slimbus and pad_clks if left enabled in x-loader
would gate abe power domain from transitioning to RET.

These should be enabled by the audio driver (if present)
in the kernel.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
7 years agox-loader: correct per dpll post-dividers for panda
Aneesh V [Mon, 4 Oct 2010 05:36:57 +0000 (11:06 +0530)]
x-loader: correct per dpll post-dividers for panda

Reverting per dpll post-divider changes done as workaround for 6-layer panda
board. This is causing issues with display.

Also moving per dpll table back to clock.c as there is no more difference
between SDP and Panda now.

Signed-off-by: Sebastien Jan <s-jan@ti.com>
Signed-off-by: Aneesh V <aneesh@ti.com>