9
0
Fork 0
Commit Graph

21 Commits

Author SHA1 Message Date
Sascha Hauer a211494c23 ARM: i.MX53: fix bootsource_instance detection
Bootsource instance is encoded in bit 21:20 of the SBMR register,
not in bit 22:21.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-27 10:38:49 +01:00
Philipp Zabel fb2b3e2cd4 ARM i.MX6: Fix bootsource detection
This patch fixes boot_mode detection for non-internal boot and
bootsource detection for i2c boot. Further, the bootsouce_instance
is now determined for spi, i2c, and mmc/sd boot.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-08 15:04:10 +02:00
Sascha Hauer d2ebeb2944 ARM: i.MX53: Add bootsource instance information
The i.MX53 has the bootsource instance information stored
in SBMR[21:22], expose it to the environment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-04 10:54:27 +02:00
Marc Kleine-Budde 7b66d9cddd bootsource: create arch independent bootsource framework
This patch seperates the imx independent from the arch independent code. The
following functions and enums are renamed:

- imx_bootsource() -> bootsource_get()
- imx_set_bootsource() -> bootsource_set()
- enum imx_bootsource -> enum bootsource

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-04 10:54:22 +02:00
Sascha Hauer 0994834462 ARM: i.MX: rename barebox_loc to bootsource
Rename the barebox_loc environment variable to bootsource, since
- barebox_loc is a mixture between abbriviation and fulltext which is not nice
- technically it describes the source the SoC has booted from. This is not
  necessarily barebox but could also be some other first stage loader.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-03 14:21:13 +02:00
Marc Kleine-Budde c74fb45f64 ARM i.MX bootsource: add separate function for mx25 and mx35
This patch creates a seperate function for mx25 and mx35 to save it's
bootsource.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-26 10:20:17 +01:00
Marc Kleine-Budde 39c350aa50 ARM i.MX bootsource: rename imx_27_boot_save_loc -> imx27_boot_save_loc
This patch renames imx_27_boot_save_loc() to imx27_boot_save_loc(), so that all
imx*_boot_save_loc() functions follow the same nameing sheme.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-26 10:20:17 +01:00
Marc Kleine-Budde c4f79aff8b ARM i.MX bootsource: imx_25_35_boot_save_loc: remove leftover do-nothing code
This patch removes some code leftover from:
    a029e32 ARM i.MX: rework bootsource setting
which is now a no-op.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-26 10:20:17 +01:00
Marc Kleine-Budde 9f6614d644 ARM i.MX bootsource: convert all imx*_boot_save_loc functions to void
This function gives all functions a common, i.e. void, return value.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-26 10:20:17 +01:00
Marc Kleine-Budde 19e5e04d81 ARM i.MX bootsource: convert enums from enum imx_bootsource to uppercase
Enums are in the same way as defines, so write them in uppercase.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-26 10:20:14 +01:00
Sascha Hauer 77fd727b89 ARM i.MX6: save boot location
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 13:43:29 +01:00
Robert P. J. Day 1b6041a662 mach-imx: Comment typo fix, "enviroment" -> "environment"
A couple trivial spelling fixes.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-19 10:14:11 +01:00
Sascha Hauer 7b84676763 ARM i.MX53: set bootsource location
To be able to set the environment location based on the
bootsource.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:58 +02:00
Sascha Hauer a029e32d7f ARM i.MX: rework bootsource setting
This moves the known i.MX bootsource settings to a single file
so that the code can be shared. Also we add a enum for the different
boot sources so that it can be used in C Code and not only on the shell.
The pcm038 board is changed to use it instead of digging in the registers
manually.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-15 19:44:36 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:57:41 +02:00
Alexander Shiyan f8856d422e Define barebox_loc magic variable only once
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-10 11:24:07 +02:00
Alexander Shiyan 904ebefe21 i.MX27: Export boot source to magic variables
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-02 10:07:48 +02:00
Sascha Hauer 51845b0ce0 ARM i.MX boot: Add barebox_loc magicvar
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:51:32 +01:00
Sascha Hauer 3ee7877a48 introduce io.h
To allow for some generic io accessors introduce io.h and use
this instead of asm/io.h throughout the tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-22 19:03:05 +02:00
Sascha Hauer d29842a5e0 ARM i.MX25/35: initialize barebox_loc earlier
Now that env_push_context is in a coredevice_initcall
we can initialize barebox_loc earlier so that we can
use it inside later initcalls.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-17 09:37:48 +02:00
Marc Reilly c69f625a71 imx(25,35): save boot location into $barebox_loc env.
Saves the boot source into an environment variable so env scripts
can more easily use boot source information.

Note only tested on imx35. I haven't added support for any other variants
because I'm not familiar with them. (And can't test them anyway).

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-19 09:37:23 +01:00