9
0
Fork 0
Commit Graph

161 Commits

Author SHA1 Message Date
Antony Pavlov 8e89bc594a treewide: remove address of the Free Software Foundation
The FSF address has changed; The FSF site says that
address is

  Free Software Foundation
  51 Franklin Street, Fifth Floor
  Boston, MA 02110-1301
  USA

(see http://www.fsf.org/about/contact/)

Instead of updating it each time the address changes,
just drop it completely treewide.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-11 08:35:25 +02:00
Wadim Egorov 2565cac2cf ARM: omap: barebox update nand xloadslots handler
- Added barebox nand xloadslots update handler
- This handler updates all given xload slots in nand

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-19 09:15:39 +02:00
Sascha Hauer fb061bffe4 ARM: AM33xx: Add SPI bbu handler
We already have an update handler for the MLO on SPI, add
a update handler for the regular barebox aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-15 12:45:23 +02:00
Sascha Hauer 4fea2ceb98 ARM: am33xx: Add missing include
am33xx-generic.h needs memcpy, so include string.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-15 12:45:02 +02:00
Sascha Hauer a570417687 ARM: am33xx: Pass uart_base to soft_reset function
To make am33xx_uart0_soft_reset more flexible rename it to
am33xx_uart_soft_reset and pass the UART base to it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-15 12:45:02 +02:00
Sascha Hauer caa31714b5 ARM: AM33xx: make bbu handler static inline
The static inline wrapper for am33xx_bbu_spi_nor_mlo_register_handler
lacked the 'static inline'. add it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-15 12:44:39 +02:00
Sascha Hauer 1debe41a93 ARM: omap3: Add missing include
omap3-generic.h needs memcpy, include linux/string.h for this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-03 15:12:56 +01:00
Sascha Hauer ee7f5d5d50 ARM: OMAP: Safe boot info in fixed SRAM address
Storing the boot information in the image itself and passing a pointer
around between images is cumbersome and doesn't fit well with multiimage
support where the pointer we pass around is already occupied by the
devicetree.
Do the same as U-Boot does and store the boot information at the bottom
of the SRAM public stack.
To maintain the compatibility between new xloaders and older barebox
binaries we still pass the boot information to the next stage via pointer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-10 14:35:34 +01:00
Sascha Hauer ed039cd72b Merge branch 'for-next/omap-drivers' 2013-12-06 08:23:27 +01:00
Sascha Hauer 599e61ebd9 bus: Add omap gpmc driver
This adds a devicetree-only driver for to configure the gpmc and its
child devices from dt. Currently only NAND is supported.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:54 +01:00
Sascha Hauer e0fbce20e6 ARM: OMAP: centralize omap startup
This introduces a single omap_init function which detects the
SoC and does all further SoC initialization. This is done to get
rid of initcalls without proper SoC protection. The same has been
done for i.MX already.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 21:34:06 +01:00
Sascha Hauer 1869803405 spi: omap: encode register offset into device_id
The omap3 and omap4/am33xx spi cores differ in the offset of the
registers in the address space. Instead of encoding this into the
resources use the platform_device_id mechanism. This is done in
preparation for devicetree probe support where the address space
is in the devicetree and can't be adjusted.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 15:35:12 +01:00
Sascha Hauer dd04578bb2 ARM: OMAP: Make debug_ll UART Kconfig selectable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 15:34:36 +01:00
Sascha Hauer 5a4d27516e ARM: am33xx: Add am33xx_ prefix to SoC specific functions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 14:24:03 +01:00
Sascha Hauer cca45a3299 ARM: OMAP: Make cpu_is_* macros runtime if necessary
Currently unused, just preparation for the next steps when we'll
get multiarch support for OMAP.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 11:25:37 +01:00
Sascha Hauer f56a48471a ARM: OMAP: select correct reset_cpu function at runtime
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 11:25:01 +01:00
Sascha Hauer f6b399ef9b ARM: OMAP: Add SoC prefix to running_in_* functions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 11:24:42 +01:00
Jan Weitzel c988b8bf7f i2c-omap: Update driver
The driver didn't work well with at24 driver. NACKS are lost.
Errors are lost in isr due to the local variable err. Also we didn't wait for
bus free in omap_i2c_xfer_msg.

Fix issues and get other improvements from linux kernel

Tested on OMAP4 and AM335x

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-27 16:24:37 +02:00
Sascha Hauer 5913b71943 ARM: OMAP: register OMAP specific barebox bootm handler
The OMAP ROM code passes the boot information via r0 to the
bootloader. Add an OMAP specific barebox handler to pass this
information to the next stage. This allows us to chainload
bootloaders without loosing the information where we booted from.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-27 16:13:19 +02:00
Sascha Hauer 7f6b6d25d8 Merge branch 'for-next/omap'
Conflicts:
	arch/arm/boards/pcm051/env/config
2013-09-05 10:40:04 +02:00
Teresa Gámez f1cf4433bf PCM051: Fixup DDRPLL
The correct DDRPLL for PCM051 is 303MHz.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-05 10:15:49 +02:00
Sascha Hauer abd545d2f9 ARM: am33xx: make DDR PLL frequency configurable
Needed for 400MHz DDR3.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-27 07:12:34 +02:00
Sascha Hauer e3cbf4f762 ARM: am33xx: Add mmc1 registration helper
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-27 07:12:33 +02:00
Jan Luebbe ed02d24564 ARM: am33xx: implement cpu revision decoding
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-27 07:12:33 +02:00
Teresa Gámez 9f122f8bf0 ARM: am33xx: Cleanup of lowlevel code
There is a lot of duplicate lowlevel code between the
am33xx boards. Move this code to am33xx_generic and
create structs for sdram settings.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-27 07:12:33 +02:00
Sascha Hauer 2d69e5095b ARM: omap: rename INIT_LL to omap_uart_lowlevel_init
Function should use lower case letters. Also give this function
more namespace. While at it include io.h rather than asm/io.h.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-27 07:12:33 +02:00
Sascha Hauer 65504828dd ARM: omap: fix omap_save_bootinfo
omap_save_bootinfo derefences the argument passed to barebox without
checking it for validity. This breaks 2nd stage booting where r0
is undefined. The best we can do is to check whether the pointer is
somewhere in SRAM and is word aligned. This at least makes sure that
we do not oops. This introduces SoC specific xxx_save_bootinfo variants
since the SRAM addresses/sizes differ between SoCs.

Additionally fix the prototype for omap_save_bootinfo. It uses r0, so
it must be passed this variable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-27 07:12:33 +02:00
Sascha Hauer be322768f0 ARM: omap: Allow to set mmc devname used for booting
This adds a omap_set_bootmmc_devname function which can be used
to specify the MMC boot device. In an xload configuration this
is then used to load the next stage. In a regular build this is
used to mount /boot.
Also a device_detect_by_name is added to allow to disable probing
for sd/mmc cards during startup.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-27 07:12:32 +02:00
Sascha Hauer c2ef478873 mci: omap: Allow to set mmc devname via platformdata
To be able to get persistent names for the sd/mmc devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-27 07:12:32 +02:00
shravan 07acd1cc65 ARM: omap: barebox update spi nor MLO handler
-Added mlo spi NOR copy handler
	-This handler will convert the MLO to big endian
	-Tested with pcm051 board

Signed-off-by: shravan <shravan.k@phytec.in>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-26 08:59:19 +02:00
Teresa Gámez c1b18f6f2a AM33xx: Make OSC frequency board depended
The oscillator frequency varies on different AM33xx boards.
Pass the osc frequency from lowlevel board code
to set the correct one on every board.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Reviewed-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-22 09:02:32 +02:00
Sascha Hauer 8c1180c3ed ARM: remove include of mach/gpio.h for gpiolib users
gpiolib user have nothing to define in their machine
specific gpio.h, so do not include it.

The only thing they could define would be ARCH_NR_GPIOS,
but currently no architecture defines it. Should an architecure
feel the need to do it this would be a good opportunity to
get rid of this limitation.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-16 15:58:33 +02:00
Teresa Gámez ad0a5ec74b ARM OMAP: get barebox partion information from boardcode
The size and offset of the barebox partition in nand and spi nor flash
may vary on different boards. Make it possible to pass this information
over boardfile if needed.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-10 23:30:42 +02:00
Teresa Gámez c5c875ab7f arm: omap: store boot source info from ROM loader
The ROM loader passes the address of a buffer to the MLO in
register 0. Store this data so we can find the boot source later.
On the same way the bootinformation are passed to the barebox,
then. It has to be enshured that r0 contains always the
buffer or the boot source detection will not work.

Applied this on all OMAPs. This patch is based on work of
Jan Luebbe <jlu@pengutronix.de>.

Compile tested on all OMAP boards.
Tested on pcm049, phyCARD-A-L1 and pcm051.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Tested-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-10 23:30:42 +02:00
Teresa Gámez f0c0d46f64 ARM: AM33xx: Make mpu pll configurable by lowlevel board code
Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-10 23:30:42 +02:00
Shravan kumar 692db70b61 PCM051: Add first stage support
This patch adds first stage support for PCM051.

Signed-off-by: Shravan kumar <shravan.k@phytec.in>
Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-10 23:30:26 +02:00
Teresa Gámez 63ae7219e9 ARM: OMAP: AM33xx: Add basic NAND support
Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-09 19:33:15 +02:00
Christoph Fritz 80c753796f ARM omap-fb: add board helper code
This patch adds OMAP machine dependent framebuffer code so that
board files can make use of driver omap-fb.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-24 21:49:34 +02:00
Teresa Gámez f64ed12bb6 i2c-omap: Remove cpu_is functions completely
This patch removes the call of the cpu_is_* functions completely
and uses id_tables instead.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-23 20:35:22 +02:00
Teresa Gámez 5e7c87a269 ARM: AM33xx: Add i2c support for AM33xx
Added device register functions and cpu_is_am33xx()
function.
Adapted the i2c-omap driver. AM335x has a lower
clock rate and the timeout of polling the isr function
had to be increased.

Based on a patch from Shravan Kumar <shravan.k@phytec.in>.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-21 08:05:54 +02:00
Teresa Gámez 693a9874fe ARM: OMAP: AM33xx: Add muxing function for spi0
Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-19 21:50:51 +02:00
Jan Luebbe 3b16061615 arm: omap: am33xx: set up SPI devices
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-18 21:33:58 +02:00
Jan Weitzel 88796b1a99 omap4: set voltage according to mpu freq
For OMAP4460 omap4_scale_vcores must set the voltage according to mpu freq.

OPP100  700MHz 1210mV
OPPTB   920MHz 1320mV
OPPNT  1200MHz 1380mV

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-18 21:33:55 +02:00
Jan Luebbe f88a1ff57d arm: am33xx: add pinmux config for RMII2
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-23 15:38:29 +02:00
Jan Luebbe 0d0b92ddc7 arm: am33xx: add pinmux and clock config for UART2
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-23 15:38:28 +02:00
Jan Luebbe de5b9f71bf m33xx-clock: remove unused code
This patch includes no functional change. If a configurable DDRPLL_M
is required later, it should be set by the board instead of from here.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-19 07:25:46 +02:00
Jan Luebbe 98839ca886 m33xx-clock: configure PLLs based on oscillator frequency
The *PLL_N values can be calculated from the OSC value. This patch
includes no functional change.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-19 07:25:46 +02:00
Jan Luebbe f838be333e am33xx: add defines for GPIOs
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-19 07:25:46 +02:00
Jan Luebbe d7a913469c omap: move to common bootsource framework
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Folded fix into this patch:

[PATCH] omap4 regression: set correct boot source

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
2013-04-18 08:01:26 +02:00
Vicente Bergas bb18fee0d8 OMAP4: add command to select next boot device priority
On OMAP4 SoC there is a SAR memory region (Save & Rescue)
where the ROM code reads the device to boot from.
This patch adds a way to set this.

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 10:47:43 +02:00