Re: [U-Boot] please pull u-boot-samsung master

2013-01-12 Thread Albert ARIBAUD
On Fri, 11 Jan 2013 22:33:58 +0100, Albert ARIBAUD
 wrote:
> Hi Minkyu,
> 
> On Fri, 11 Jan 2013 17:23:10 +0900, Minkyu Kang 
> wrote:
> > Dear Albert,
> > 
> >   Merge samsung, imx, tegra into u-boot-arm/master (2012-12-22 11:59:14 
> > +0100)
> > 
> > are available in the git repository at:
> > 
> > 
> >   git://git.denx.de/u-boot-samsung master
> > 
> > for you to fetch changes up to a2468dedef569863e1243e802fbe3aa7565e1de1:
> > 
> >   EXYNOS5: Enable console multiplexing in u-boot (2013-01-11 17:15:04 +0900)
> > 
> > 
> > Ajay Kumar (6):
> >   EXYNOS5: Add support for FIMD and DP
> >   EXYNOS5: Change parent clock of FIMD to MPLL
> >   EXYNOS: Add dummy definition to fix compilation dependency on 
> > CONFIG_EXYNOS_MIPI_DSIM
> >   video: Modify exynos_fimd driver to support LCD console
> >   EXYNOS5: Make all display related code dependent on CONFIG_LCD
> >   EXYNOS5: Enable console multiplexing in u-boot
> > 
> > Chander Kashyap (4):
> >   EXYNOS: EXYNOS4X12: Populate Exynos4x12 register addresses
> >   EXYNOS: EXYNOS4X12: Add clock structure for EXYNOS4X12
> >   EXYNOS: EXYNOS4X12: Add gpio structure for EXYNOS4X12
> >   EXYNOS: EXYNOS4X12: extract Exynos4x12 IPs clock frequency
> > 
> > Hatim RV (5):
> >   EXYNOS5: FDT: add initial dts file for EXYNOS5250, SMDK5250
> >   fdt: exynos5: Add DT node definition for SROM and SMSC9215
> >   exynos5: Add DT based driver for SMC911X ethernet
> >   exynos5: config: Rename the smdk5250.h to exynos5250-dt.h
> >   SMDK5250: config: Add configuration file for SMDK5250 board
> > 
> > Jaehoon Chung (2):
> >   Exynos: clock: support get_mmc_clk for exynos
> >   Exynos: clock: add CLK_DIV_FSYS3 at set_mmc_clk
> > 
> > Piotr Wilczek (1):
> >   arm:exynos4:pinmux: Modify the gpio function for mmc
> > 
> > Rajeshwari Shinde (22):
> >   EXYNOS5: FDT: Add I2C device node data
> >   EXYNOS5 : FDT: Add Aliases for I2C device
> >   FDT: Add compatible string for I2C
> >   EXYNOS5: FDT : Decode peripheral id
> >   I2C: Driver changes for FDT support
> >   SMDK5250: Initialise I2C using FDT
> >   EXYNOS5: FDT: Add sound device node data
> >   EXYNOS5: FDT: Add sound and codec device node
> >   EXYNOS5: FDT: Add compatible strings for sound
> >   Sound: Add FDT support to driver
> >   Sound: WM8994: Add FDT support to codec
> >   Sound: Add FDT support to CMD.
> >   EXYNOS5: FDT: Add compatible strings for SPI
> >   EXYNOS5 : FDT: Add Aliases for SPI device
> >   EXYNOS5: FDT: Add SPI device node data
> >   SPI: EXYNOS: Add FDT support to driver.
> >   EHCI: Exynos: Add fdt support
> >   EXYNOS5: Add device node for USB.
> >   EXYNOS5: FDT: Add compatible strings for USB
> >   EXYNOS5: FDT: Add compatible strings for PMIC
> >   EXYNOS5: Add device node for PMIC
> >   PMIC: MAX77686: Add FDT Support
> > 
> > Vivek Gautam (1):
> >   SMDK5250: Enable VBus for USB 2.0 controller
> > 
> > Łukasz Majewski (2):
> >   spl:falcon:trats Update Trats default board configuration file to 
> > support FALCON MODE
> >   video:cache:fix: Enable dcache flush at LCD subsystem for Exynos 
> > based boards
> > 
> >  arch/arm/cpu/armv7/exynos/clock.c|  272 +-
> >  arch/arm/cpu/armv7/exynos/pinmux.c   |   74 ++
> >  arch/arm/dts/exynos5250.dtsi |  154 
> >  arch/arm/include/asm/arch-exynos/clk.h   |1 +
> >  arch/arm/include/asm/arch-exynos/clock.h |  276 ++
> >  arch/arm/include/asm/arch-exynos/cpu.h   |   48 +++-
> >  arch/arm/include/asm/arch-exynos/dp_info.h   |2 +
> >  arch/arm/include/asm/arch-exynos/gpio.h  |   85 +++
> >  arch/arm/include/asm/arch-exynos/mipi_dsim.h |7 +
> >  arch/arm/include/asm/arch-exynos/periph.h|   33 +--
> >  arch/arm/include/asm/arch-exynos/pinmux.h|8 +
> >  arch/arm/include/asm/arch-exynos/sromc.h |   18 ++
> >  board/samsung/dts/exynos5250-smdk5250.dts|   69 ++
> >  board/samsung/smdk5250/smdk5250.c|  237 +++
> >  board/samsung/trats/trats.c  |2 +-
> >  common/cmd_sound.c   |2 +-
> >  doc/device-tree-bindings/exynos/isp-spi.txt  |   22 ++
> >  doc/device-tree-bindings/exynos/sound.txt|   27 +++
> >  drivers/i2c/s3c24x0_i2c.c|   83 ++-
> >  drivers/i2c/s3c24x0_i2c.h|8 +
> >  drivers/power/pmic/pmic_max77686.c   |   37 ++-
> >  drivers/sound/sound.c|  171 --
> >  drivers/sound/wm8994.c   |   74 +-
> >  drivers/sound/wm8994.h   |6 +-
> >  drivers/spi/exynos_spi.c |   96 +++-
> >  drivers/usb/host/ehci-exynos.c   |   92 +++-
> >  drivers/

[U-Boot] [PATCH v2 5/9] tegra30: add SBC1 to periph id mapping table

2013-01-12 Thread Allen Martin
SBC1 is SPI controller 1 on tegra30

Signed-off-by: Allen Martin 
---
 arch/arm/cpu/tegra30-common/clock.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/cpu/tegra30-common/clock.c 
b/arch/arm/cpu/tegra30-common/clock.c
index c67a2e1..db5ac1e 100644
--- a/arch/arm/cpu/tegra30-common/clock.c
+++ b/arch/arm/cpu/tegra30-common/clock.c
@@ -318,7 +318,7 @@ static s8 periph_id_to_internal_id[PERIPH_ID_COUNT] = {
 
/* 40 */
NONE(KFUSE),
-   NONE(SBC1), /* SBC1, 0x34, is this SPI1? */
+   PERIPHC_SBC1,
PERIPHC_NOR,
NONE(RESERVED43),
PERIPHC_SBC2,
-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 4/9] tegra: spi: add fdt support to tegra SPI SFLASH driver

2013-01-12 Thread Allen Martin
Add support for configuring tegra SPI driver from devicetree.
Support is keyed off CONFIG_OF_CONTROL.  Add entry in seaboard dts
file for spi controller to describe seaboard spi.

Signed-off-by: Allen Martin 
---
 drivers/spi/tegra_spi.c |   42 +-
 include/fdtdec.h|1 +
 lib/fdtdec.c|1 +
 3 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/tegra_spi.c b/drivers/spi/tegra_spi.c
index 9bb34e2..36b0cd0 100644
--- a/drivers/spi/tegra_spi.c
+++ b/drivers/spi/tegra_spi.c
@@ -32,6 +32,11 @@
 #include 
 #include 
 #include 
+#ifdef CONFIG_OF_CONTROL
+#include 
+#endif
+
+DECLARE_GLOBAL_DATA_PTR;
 
 #if defined(CONFIG_SPI_CORRUPTS_UART)
  #define corrupt_delay()   udelay(CONFIG_SPI_CORRUPTS_UART_DLY);
@@ -44,6 +49,7 @@ struct tegra_spi_slave {
struct spi_tegra *regs;
unsigned int freq;
unsigned int mode;
+   int periph_id;
 };
 
 static inline struct tegra_spi_slave *to_tegra_spi(struct spi_slave *slave)
@@ -85,7 +91,41 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned 
int cs,
spi->slave.bus = bus;
spi->slave.cs = cs;
spi->freq = max_hz;
+#ifdef CONFIG_OF_CONTROL
+   int node = fdtdec_next_compatible(gd->fdt_blob, 0,
+ COMPAT_NVIDIA_TEGRA20_SFLASH);
+   if (node < 0) {
+   debug("%s: cannot locate sflash node\n", __func__);
+   return NULL;
+   }
+   spi->regs = (struct spi_tegra *)fdtdec_get_addr(gd->fdt_blob,
+   node, "reg");
+   if ((fdt_addr_t)spi->regs == FDT_ADDR_T_NONE) {
+   debug("%s: no sflash register found\n", __func__);
+   return NULL;
+   }
+   spi->freq = fdtdec_get_int(gd->fdt_blob, node, "spi-max-frequency", 0);
+   if (!spi->freq) {
+   debug("%s: no sflash max frequency found\n", __func__);
+   return NULL;
+   }
+   spi->periph_id = clock_decode_periph_id(gd->fdt_blob, node);
+   if (spi->periph_id == PERIPH_ID_NONE) {
+   debug("%s: could not decode periph id\n", __func__);
+   return NULL;
+   }
+#else
spi->regs = (struct spi_tegra *)NV_PA_SPI_BASE;
+   spi->freq = TEGRA_SPI_MAX_FREQ;
+   spi->periph_id = PERIPH_ID_SPI1;
+#endif
+   if (max_hz < spi->freq) {
+   debug("%s: limiting frequency from %u to %u\n", __func__,
+ spi->freq, max_hz);
+   spi->freq = max_hz;
+   }
+   debug("%s: controller initialized at %p, freq = %u, periph_id = %d\n",
+ __func__, spi->regs, spi->freq, spi->periph_id);
spi->mode = mode;
 
return &spi->slave;
@@ -110,7 +150,7 @@ int spi_claim_bus(struct spi_slave *slave)
u32 reg;
 
/* Change SPI clock to correct frequency, PLLP_OUT0 source */
-   clock_start_periph_pll(PERIPH_ID_SPI1, CLOCK_ID_PERIPH, spi->freq);
+   clock_start_periph_pll(spi->periph_id, CLOCK_ID_PERIPH, spi->freq);
 
/* Clear stale status here */
reg = SPI_STAT_RDY | SPI_STAT_RXF_FLUSH | SPI_STAT_TXF_FLUSH | \
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 70d0e97..1504336 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -70,6 +70,7 @@ enum fdt_compat_id {
COMPAT_NVIDIA_TEGRA20_NAND, /* Tegra2 NAND controller */
COMPAT_NVIDIA_TEGRA20_PWM,  /* Tegra 2 PWM controller */
COMPAT_NVIDIA_TEGRA20_DC,   /* Tegra 2 Display controller */
+   COMPAT_NVIDIA_TEGRA20_SFLASH,   /* Tegra 2 SPI flash controller */
 
COMPAT_COUNT,
 };
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 6dba438..6779278 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -45,6 +45,7 @@ static const char * const compat_names[COMPAT_COUNT] = {
COMPAT(NVIDIA_TEGRA20_NAND, "nvidia,tegra20-nand"),
COMPAT(NVIDIA_TEGRA20_PWM, "nvidia,tegra20-pwm"),
COMPAT(NVIDIA_TEGRA20_DC, "nvidia,tegra20-dc"),
+   COMPAT(NVIDIA_TEGRA20_SFLASH, "nvidia,tegra20-sflash"),
 };
 
 const char *fdtdec_get_compatible(enum fdt_compat_id id)
-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 3/9] tegra20: fdt: add SPI SFLASH node

2013-01-12 Thread Allen Martin
Add node for tegra20 SPI SFLASH controller to fdt.

Signed-off-by: Allen Martin 
---
 arch/arm/dts/tegra20.dtsi |   12 
 board/nvidia/dts/tegra20-seaboard.dts |4 
 2 files changed, 16 insertions(+)

diff --git a/arch/arm/dts/tegra20.dtsi b/arch/arm/dts/tegra20.dtsi
index 9739f91..4d7dee9 100644
--- a/arch/arm/dts/tegra20.dtsi
+++ b/arch/arm/dts/tegra20.dtsi
@@ -236,6 +236,18 @@
clocks = <&tegra_car 12>, <&tegra_car 124>;
};
 
+   spi@7000c380 {
+   compatible = "nvidia,tegra20-sflash";
+   reg = <0x7000c380 0x80>;
+   interrupts = <0 39 0x04>;
+   nvidia,dma-request-selector = <&apbdma 11>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   status = "disabled";
+   /* PERIPH_ID_SPI1, PLLP_OUT0 */
+   clocks = <&tegra_car 43>;
+   };
+
i2c@7000c400 {
#address-cells = <1>;
#size-cells = <0>;
diff --git a/board/nvidia/dts/tegra20-seaboard.dts 
b/board/nvidia/dts/tegra20-seaboard.dts
index b0da0be..eb92e06 100644
--- a/board/nvidia/dts/tegra20-seaboard.dts
+++ b/board/nvidia/dts/tegra20-seaboard.dts
@@ -78,6 +78,10 @@
clock-frequency = <10>;
};
 
+   spi@7000c380 {
+   spi-max-frequency = <2500>;
+   };
+
i2c@7000c400 {
status = "disabled";
};
-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 0/9] tegra: SPI drivers

2013-01-12 Thread Allen Martin
This series updates the tegra20 SPI driver to add fdt support and adds
a new tegra30 SPI driver.  This series depends on the following
patches:

Allen Martin:
  fdt: fix dts preprocessor options
  tegra: remove IRDA pinmux synonym

Testing was done on seaboard (tegra20) and cardhu (tegra30).

Changes in v2:
-Added new patch to sort dts files prior to adding new nodes
-Moved "max-spi-frequency" out to board dts files
-Moved tegra20 SFLASH fdt changes out to separate patch
-Added valid flag to slink driver controller structure

Allen Martin (9):
  tegra: fdt: sort dts files
  tegra: fdt: add apbdma node
  tegra20: fdt: add SPI SFLASH node
  tegra: spi: add fdt support to tegra SPI SFLASH driver
  tegra30: add SBC1 to periph id mapping table
  tegra30: fdt: add SPI SLINK nodes
  tegra: add addresses of SPI SLINK controllers
  tegra: add SPI SLINK driver
  tegra: cardhu: config: enable SPI

 arch/arm/cpu/tegra30-common/clock.c   |2 +-
 arch/arm/dts/tegra20.dtsi |  412 +
 arch/arm/dts/tegra30.dtsi |  125 +++-
 arch/arm/include/asm/arch-tegra/tegra.h   |6 +
 arch/arm/include/asm/arch-tegra/tegra_slink.h |   84 +
 board/nvidia/common/board.c   |3 +-
 board/nvidia/dts/tegra20-harmony.dts  |   32 +-
 board/nvidia/dts/tegra20-seaboard.dts |  141 -
 board/nvidia/dts/tegra20-ventana.dts  |   18 +-
 board/nvidia/dts/tegra20-whistler.dts |   12 +-
 board/nvidia/dts/tegra30-cardhu.dts   |   22 +-
 drivers/spi/Makefile  |1 +
 drivers/spi/tegra_slink.c |  335 
 drivers/spi/tegra_spi.c   |   42 ++-
 include/configs/cardhu.h  |   11 +
 include/fdtdec.h  |2 +
 lib/fdtdec.c  |2 +
 17 files changed, 940 insertions(+), 310 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-tegra/tegra_slink.h
 create mode 100644 drivers/spi/tegra_slink.c

-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 7/9] tegra: add addresses of SPI SLINK controllers

2013-01-12 Thread Allen Martin
Add I/O addresses of SPI SLINK controllers 1-6

Signed-off-by: Allen Martin 
---
 arch/arm/include/asm/arch-tegra/tegra.h |6 ++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/include/asm/arch-tegra/tegra.h 
b/arch/arm/include/asm/arch-tegra/tegra.h
index 67e6fd0..d2435c1 100644
--- a/arch/arm/include/asm/arch-tegra/tegra.h
+++ b/arch/arm/include/asm/arch-tegra/tegra.h
@@ -40,6 +40,12 @@
 #define NV_PA_APB_UARTE_BASE   (NV_PA_APB_MISC_BASE + 0x6400)
 #define NV_PA_NAND_BASE(NV_PA_APB_MISC_BASE + 0x8000)
 #define NV_PA_SPI_BASE (NV_PA_APB_MISC_BASE + 0xC380)
+#define NV_PA_SLINK1_BASE  (NV_PA_APB_MISC_BASE + 0xD400)
+#define NV_PA_SLINK2_BASE  (NV_PA_APB_MISC_BASE + 0xD600)
+#define NV_PA_SLINK3_BASE  (NV_PA_APB_MISC_BASE + 0xD800)
+#define NV_PA_SLINK4_BASE  (NV_PA_APB_MISC_BASE + 0xDA00)
+#define NV_PA_SLINK5_BASE  (NV_PA_APB_MISC_BASE + 0xDC00)
+#define NV_PA_SLINK6_BASE  (NV_PA_APB_MISC_BASE + 0xDE00)
 #define TEGRA_DVC_BASE (NV_PA_APB_MISC_BASE + 0xD000)
 #define NV_PA_PMC_BASE (NV_PA_APB_MISC_BASE + 0xE400)
 #define NV_PA_EMC_BASE (NV_PA_APB_MISC_BASE + 0xF400)
-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 9/9] tegra: cardhu: config: enable SPI

2013-01-12 Thread Allen Martin
Turn on SPI in cardhu config file

Signed-off-by: Allen Martin 
---
 include/configs/cardhu.h |   11 +++
 1 file changed, 11 insertions(+)

diff --git a/include/configs/cardhu.h b/include/configs/cardhu.h
index aa725ba..1616b39 100644
--- a/include/configs/cardhu.h
+++ b/include/configs/cardhu.h
@@ -49,6 +49,17 @@
 
 #define CONFIG_ENV_IS_NOWHERE
 
+/* SPI */
+#define CONFIG_TEGRA_SLINK
+#define CONFIG_TEGRA_SLINK_CTRLS   6
+#define CONFIG_SPI_FLASH
+#define CONFIG_SPI_FLASH_WINBOND
+#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
+#define CONFIG_SF_DEFAULT_SPEED2400
+#define CONFIG_CMD_SPI
+#define CONFIG_CMD_SF
+#define CONFIG_SPI_FLASH_SIZE  (4 << 20)
+
 #include "tegra-common-post.h"
 
 #endif /* __CONFIG_H */
-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 6/9] tegra30: fdt: add SPI SLINK nodes

2013-01-12 Thread Allen Martin
Add tegra30 SPI SLINK nodes to fdt.

Signed-off-by: Allen Martin 
---
 arch/arm/dts/tegra30.dtsi   |   72 +++
 board/nvidia/dts/tegra30-cardhu.dts |4 ++
 2 files changed, 76 insertions(+)

diff --git a/arch/arm/dts/tegra30.dtsi b/arch/arm/dts/tegra30.dtsi
index d58054c..5f02515 100644
--- a/arch/arm/dts/tegra30.dtsi
+++ b/arch/arm/dts/tegra30.dtsi
@@ -91,6 +91,78 @@
clocks = <&tegra_car 47>;
};
 
+   spi@7000d400 {
+   compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
+   reg = <0x7000d400 0x200>;
+   interrupts = <0 59 0x04>;
+   nvidia,dma-request-selector = <&apbdma 15>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   status = "disabled";
+   /* PERIPH_ID_SBC1, PLLP_OUT0 */
+   clocks = <&tegra_car 41>;
+   };
+
+   spi@7000d600 {
+   compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
+   reg = <0x7000d600 0x200>;
+   interrupts = <0 82 0x04>;
+   nvidia,dma-request-selector = <&apbdma 16>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   status = "disabled";
+   /* PERIPH_ID_SBC2, PLLP_OUT0 */
+   clocks = <&tegra_car 44>;
+   };
+
+   spi@7000d800 {
+   compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
+   reg = <0x7000d480 0x200>;
+   interrupts = <0 83 0x04>;
+   nvidia,dma-request-selector = <&apbdma 17>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   status = "disabled";
+   /* PERIPH_ID_SBC3, PLLP_OUT0 */
+   clocks = <&tegra_car 46>;
+   };
+
+   spi@7000da00 {
+   compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
+   reg = <0x7000da00 0x200>;
+   interrupts = <0 93 0x04>;
+   nvidia,dma-request-selector = <&apbdma 18>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   status = "disabled";
+   /* PERIPH_ID_SBC4, PLLP_OUT0 */
+   clocks = <&tegra_car 68>;
+   };
+
+   spi@7000dc00 {
+   compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
+   reg = <0x7000dc00 0x200>;
+   interrupts = <0 94 0x04>;
+   nvidia,dma-request-selector = <&apbdma 27>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   status = "disabled";
+   /* PERIPH_ID_SBC5, PLLP_OUT0 */
+   clocks = <&tegra_car 104>;
+   };
+
+   spi@7000de00 {
+   compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
+   reg = <0x7000de00 0x200>;
+   interrupts = <0 79 0x04>;
+   nvidia,dma-request-selector = <&apbdma 28>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   status = "disabled";
+   /* PERIPH_ID_SBC6, PLLP_OUT0 */
+   clocks = <&tegra_car 105>;
+   };
+
clocks {
#address-cells = <1>;
#size-cells = <0>;
diff --git a/board/nvidia/dts/tegra30-cardhu.dts 
b/board/nvidia/dts/tegra30-cardhu.dts
index 64c2ee2..887d3e7 100644
--- a/board/nvidia/dts/tegra30-cardhu.dts
+++ b/board/nvidia/dts/tegra30-cardhu.dts
@@ -43,6 +43,10 @@
clock-frequency = <10>;
};
 
+   spi@7000da00 {
+   spi-max-frequency = <2500>;
+   };
+
clocks {
clk_32k: clk_32K {
clock-frequency = <32768>;
-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 2/9] tegra: fdt: add apbdma node

2013-01-12 Thread Allen Martin
Add apbdma node for tegra20 and tegra30, copied directly from tegra
Linux dtsi files.

Signed-off-by: Allen Martin 
---
 arch/arm/dts/tegra20.dtsi |   21 +
 arch/arm/dts/tegra30.dtsi |   37 +
 2 files changed, 58 insertions(+)

diff --git a/arch/arm/dts/tegra20.dtsi b/arch/arm/dts/tegra20.dtsi
index c316864..9739f91 100644
--- a/arch/arm/dts/tegra20.dtsi
+++ b/arch/arm/dts/tegra20.dtsi
@@ -116,6 +116,27 @@
#clock-cells = <1>;
};
 
+   apbdma: dma {
+   compatible = "nvidia,tegra20-apbdma";
+   reg = <0x6000a000 0x1200>;
+   interrupts = <0 104 0x04
+ 0 105 0x04
+ 0 106 0x04
+ 0 107 0x04
+ 0 108 0x04
+ 0 109 0x04
+ 0 110 0x04
+ 0 111 0x04
+ 0 112 0x04
+ 0 113 0x04
+ 0 114 0x04
+ 0 115 0x04
+ 0 116 0x04
+ 0 117 0x04
+ 0 118 0x04
+ 0 119 0x04>;
+   };
+
gpio: gpio@6000d000 {
compatible = "nvidia,tegra20-gpio";
reg = < 0x6000d000 0x1000 >;
diff --git a/arch/arm/dts/tegra30.dtsi b/arch/arm/dts/tegra30.dtsi
index b0e070b..d58054c 100644
--- a/arch/arm/dts/tegra30.dtsi
+++ b/arch/arm/dts/tegra30.dtsi
@@ -9,6 +9,43 @@
#clock-cells = <1>;
};
 
+   apbdma: dma {
+   compatible = "nvidia,tegra30-apbdma", "nvidia,tegra20-apbdma";
+   reg = <0x6000a000 0x1400>;
+   interrupts = <0 104 0x04
+ 0 105 0x04
+ 0 106 0x04
+ 0 107 0x04
+ 0 108 0x04
+ 0 109 0x04
+ 0 110 0x04
+ 0 111 0x04
+ 0 112 0x04
+ 0 113 0x04
+ 0 114 0x04
+ 0 115 0x04
+ 0 116 0x04
+ 0 117 0x04
+ 0 118 0x04
+ 0 119 0x04
+ 0 128 0x04
+ 0 129 0x04
+ 0 130 0x04
+ 0 131 0x04
+ 0 132 0x04
+ 0 133 0x04
+ 0 134 0x04
+ 0 135 0x04
+ 0 136 0x04
+ 0 137 0x04
+ 0 138 0x04
+ 0 139 0x04
+ 0 140 0x04
+ 0 141 0x04
+ 0 142 0x04
+ 0 143 0x04>;
+   };
+
i2c@7000c000 {
#address-cells = <1>;
#size-cells = <0>;
-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 1/9] tegra: fdt: sort dts files

2013-01-12 Thread Allen Martin
Sort nodes in dts files according the the following rules:

1) Any nodes that already exist in any /include/d file, in the order
they appear in the /include/d file.

2) Any nodes with a reg property, in order of their address.

3) Any nodes without a reg property, alphabetically by node name.

Signed-off-by: Allen Martin 
---
 arch/arm/dts/tegra20.dtsi |  379 -
 arch/arm/dts/tegra30.dtsi |   20 +-
 board/nvidia/dts/tegra20-harmony.dts  |   32 +--
 board/nvidia/dts/tegra20-seaboard.dts |  137 ++--
 board/nvidia/dts/tegra20-ventana.dts  |   18 +-
 board/nvidia/dts/tegra20-whistler.dts |   12 +-
 board/nvidia/dts/tegra30-cardhu.dts   |   18 +-
 7 files changed, 307 insertions(+), 309 deletions(-)

diff --git a/arch/arm/dts/tegra20.dtsi b/arch/arm/dts/tegra20.dtsi
index 636ec2c..c316864 100644
--- a/arch/arm/dts/tegra20.dtsi
+++ b/arch/arm/dts/tegra20.dtsi
@@ -4,19 +4,101 @@
compatible = "nvidia,tegra20";
interrupt-parent = <&intc>;
 
-   tegra_car: clock@60006000 {
-   compatible = "nvidia,tegra20-car";
-   reg = <0x60006000 0x1000>;
-   #clock-cells = <1>;
-   };
+   host1x {
+   compatible = "nvidia,tegra20-host1x", "simple-bus";
+   reg = <0x5000 0x00024000>;
+   interrupts = <0 65 0x04   /* mpcore syncpt */
+ 0 67 0x04>; /* mpcore general */
+   status = "disabled";
 
-   clocks {
#address-cells = <1>;
-   #size-cells = <0>;
+   #size-cells = <1>;
 
-   osc: clock {
-   compatible = "fixed-clock";
-   #clock-cells = <0>;
+   ranges = <0x5400 0x5400 0x0400>;
+
+   /* video-encoding/decoding */
+   mpe {
+   reg = <0x5404 0x0004>;
+   interrupts = <0 68 0x04>;
+   status = "disabled";
+   };
+
+   /* video input */
+   vi {
+   reg = <0x5408 0x0004>;
+   interrupts = <0 69 0x04>;
+   status = "disabled";
+   };
+
+   /* EPP */
+   epp {
+   reg = <0x540c 0x0004>;
+   interrupts = <0 70 0x04>;
+   status = "disabled";
+   };
+
+   /* ISP */
+   isp {
+   reg = <0x5410 0x0004>;
+   interrupts = <0 71 0x04>;
+   status = "disabled";
+   };
+
+   /* 2D engine */
+   gr2d {
+   reg = <0x5414 0x0004>;
+   interrupts = <0 72 0x04>;
+   status = "disabled";
+   };
+
+   /* 3D engine */
+   gr3d {
+   reg = <0x5418 0x0004>;
+   status = "disabled";
+   };
+
+   /* display controllers */
+   dc@5420 {
+   compatible = "nvidia,tegra20-dc";
+   reg = <0x5420 0x0004>;
+   interrupts = <0 73 0x04>;
+   status = "disabled";
+
+   rgb {
+   status = "disabled";
+   };
+   };
+
+   dc@5424 {
+   compatible = "nvidia,tegra20-dc";
+   reg = <0x5424 0x0004>;
+   interrupts = <0 74 0x04>;
+   status = "disabled";
+
+   rgb {
+   status = "disabled";
+   };
+   };
+
+   /* outputs */
+   hdmi {
+   compatible = "nvidia,tegra20-hdmi";
+   reg = <0x5428 0x0004>;
+   interrupts = <0 75 0x04>;
+   status = "disabled";
+   };
+
+   tvo {
+   compatible = "nvidia,tegra20-tvo";
+   reg = <0x542c 0x0004>;
+   interrupts = <0 76 0x04>;
+   status = "disabled";
+   };
+
+   dsi {
+   compatible = "nvidia,tegra20-dsi";
+   reg = <0x5430 0x0004>;
+   status = "disabled";
};
};
 
@@ -28,44 +110,33 @@
  < 0x50040100 0x0100 >;
};
 
-   i2c@7000c000 {
-   #address-cells = <1>;
-   #size-cells = <0>;
-   compatible = "nvidia,tegra20-i2c";
-   reg = <0x7000C000 0x100>;
-   interrupts = < 70 >;
-   /* PERIPH_ID_I2C1, PLL_P_OU

[U-Boot] [PATCH v2 8/9] tegra: add SPI SLINK driver

2013-01-12 Thread Allen Martin
Add driver for tegra SPI "SLINK" style driver.  This controller is
similar to the tegra20 SPI "SFLASH" controller.  The difference is
that the SLINK controller is a genernal purpose SPI controller and the
SFLASH controller is special purpose and can only talk to FLASH
devices.  In addition there are potentially many instances of an SLINK
controller on tegra and only a single instance of SFLASH.  Tegra20 is
currently ths only version of tegra that instantiates an SFLASH
controller.

This driver supports basic PIO mode of operation and is configurable
(CONFIG_OF_CONTROL) to be driven off devicetree bindings.  Up to 4
devices per controller may be attached, although typically only a
single chip select line is exposed from tegra per controller so in
reality this is usually limited to 1.

To enable this driver, use CONFIG_TEGRA_SLINK

Signed-off-by: Allen Martin 
---
 arch/arm/include/asm/arch-tegra/tegra_slink.h |   84 +++
 board/nvidia/common/board.c   |3 +-
 drivers/spi/Makefile  |1 +
 drivers/spi/tegra_slink.c |  335 +
 include/fdtdec.h  |1 +
 lib/fdtdec.c  |1 +
 6 files changed, 424 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/include/asm/arch-tegra/tegra_slink.h
 create mode 100644 drivers/spi/tegra_slink.c

diff --git a/arch/arm/include/asm/arch-tegra/tegra_slink.h 
b/arch/arm/include/asm/arch-tegra/tegra_slink.h
new file mode 100644
index 000..74804b5
--- /dev/null
+++ b/arch/arm/include/asm/arch-tegra/tegra_slink.h
@@ -0,0 +1,84 @@
+/*
+ * NVIDIA Tegra SPI-SLINK controller
+ *
+ * Copyright 2010-2013 NVIDIA Corporation
+ *
+ * This software may be used and distributed according to the
+ * terms of the GNU Public License, Version 2, incorporated
+ * herein by reference.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * Version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef _TEGRA_SLINK_H_
+#define _TEGRA_SLINK_H_
+
+#include 
+
+struct slink_tegra {
+   u32 command;/* SLINK_COMMAND_0 register  */
+   u32 command2;   /* SLINK_COMMAND2_0 reg */
+   u32 status; /* SLINK_STATUS_0 register */
+   u32 reserved;   /* Reserved offset 0C */
+   u32 mas_data;   /* SLINK_MAS_DATA_0 reg */
+   u32 slav_data;  /* SLINK_SLAVE_DATA_0 reg */
+   u32 dma_ctl;/* SLINK_DMA_CTL_0 register */
+   u32 status2;/* SLINK_STATUS2_0 reg */
+   u32 rsvd[56];   /* 0x20 to 0xFF reserved */
+   u32 tx_fifo;/* SLINK_TX_FIFO_0 reg off 100h */
+   u32 rsvd2[31];  /* 0x104 to 0x17F reserved */
+   u32 rx_fifo;/* SLINK_RX_FIFO_0 reg off 180h */
+};
+
+/* COMMAND */
+#define SLINK_CMD_ENB  (1 << 31)
+#define SLINK_CMD_GO   (1 << 30)
+#define SLINK_CMD_M_S  (1 << 28)
+#define SLINK_CMD_CK_SDA   (1 << 21)
+#define SLINK_CMD_CS_POL   (1 << 13)
+#define SLINK_CMD_CS_VAL   (1 << 12)
+#define SLINK_CMD_CS_SOFT  (1 << 11)
+#define SLINK_CMD_BIT_LENGTH   (1 << 4)
+#define SLINK_CMD_BIT_LENGTH_MASK  0x001F
+/* COMMAND2 */
+#define SLINK_CMD2_TXEN(1 << 30)
+#define SLINK_CMD2_RXEN(1 << 31)
+#define SLINK_CMD2_SS_EN   (1 << 18)
+#define SLINK_CMD2_SS_EN_SHIFT 18
+#define SLINK_CMD2_SS_EN_MASK  0x000C
+#define SLINK_CMD2_CS_ACTIVE_BETWEEN   (1 << 17)
+/* STATUS */
+#define SLINK_STAT_BSY (1 << 31)
+#define SLINK_STAT_RDY (1 << 30)
+#define SLINK_STAT_ERR (1 << 29)
+#define SLINK_STAT_RXF_FLUSH   (1 << 27)
+#define SLINK_STAT_TXF_FLUSH   (1 << 26)
+#define SLINK_STAT_RXF_OVF (1 << 25)
+#define SLINK_STAT_TXF_UNR (1 << 24)
+#define SLINK_STAT_RXF_EMPTY   (1 << 23)
+#define SLINK_STAT_RXF_FULL(1 << 22)
+#define SLINK_STAT_TXF_EMPTY   (1 << 21)
+#define SLINK_STAT_TXF_FULL(1 << 20)
+#define SLINK_STAT_TXF_OVF (1 << 19)
+#define SLINK_STAT_RXF_UNR (1 << 18)
+#define SLINK_STAT_CUR_BLKCNT  (1 << 15)
+/* STATUS2 */
+#define SLINK_STAT2_RXF_FULL_CNT   (1 << 16)
+#define SLINK_STAT2_TXF_FULL_CNT   (1 << 0)
+
+#define SPI_TIMEOUT1000
+#define TEGRA_SPI_MAX_FREQ 5200
+
+#endi

Re: [U-Boot] [PATCH] arm: at91sam9x5: add dataflash boot support

2013-01-12 Thread Andreas Bießmann
Dear Albert Aribaud,

On 09.01.13 17:17, Andreas Bießmann wrote:
> Dear Bo Shen,
> 
> Albert Aribaud agreed to apply this one to u-boot-arm/master for the
> upcoming release.

gentle reminder ...

Best regards

Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] arm: at91sam9x5: add dataflash boot support

2013-01-12 Thread Albert ARIBAUD
Hi Bo,

On Fri,  7 Dec 2012 15:37:04 +0800, Bo Shen 
wrote:

> Add dataflash boot support on at91sam9x5ek board
> 
> Signed-off-by: Bo Shen 
> ---
>  boards.cfg |1 +
>  include/configs/at91sam9x5ek.h |   10 ++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/boards.cfg b/boards.cfg
> index 70a1569..e799d9b 100644
> --- a/boards.cfg
> +++ b/boards.cfg
> @@ -97,6 +97,7 @@ at91sam9m10g45ek_nandflash   arm arm926ejs   
> at91sam9m10g45ekatmel
>  at91sam9rlek_dataflash   arm arm926ejs   at91sam9rlek
> atmel  at91at91sam9rlek:AT91SAM9RL,SYS_USE_DATAFLASH
>  at91sam9rlek_nandflash   arm arm926ejs   at91sam9rlek
> atmel  at91at91sam9rlek:AT91SAM9RL,SYS_USE_NANDFLASH
>  at91sam9x5ek_nandflash   arm arm926ejs   at91sam9x5ek
> atmel  at91at91sam9x5ek:AT91SAM9X5,SYS_USE_NANDFLASH
> +at91sam9x5ek_dataflash   arm arm926ejs   at91sam9x5ek
> atmel  at91at91sam9x5ek:AT91SAM9X5,SYS_USE_DATAFLASH
>  at91sam9x5ek_spiflasharm arm926ejs   at91sam9x5ek
> atmel  at91at91sam9x5ek:AT91SAM9X5,SYS_USE_SPIFLASH
>  at91sam9x5ek_mmc arm arm926ejs   at91sam9x5ek
> atmel  at91at91sam9x5ek:AT91SAM9X5,SYS_USE_MMC
>  at91sam9xeek_dataflash_cs0   arm arm926ejs   at91sam9260ek   
> atmel  at91at91sam9260ek:AT91SAM9XE,SYS_USE_DATAFLASH_CS0
> diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h
> index 1317582..a034ed0 100644
> --- a/include/configs/at91sam9x5ek.h
> +++ b/include/configs/at91sam9x5ek.h
> @@ -178,6 +178,16 @@
>  #define CONFIG_BOOTCOMMAND   "sf probe 0; " \
>   "sf read 0x2200 0x10 0x30; " \
>   "bootm 0x2200"
> +#elif defined(CONFIG_SYS_USE_DATAFLASH)
> +/* bootstrap + u-boot + env + linux in data flash */
> +#define CONFIG_ENV_IS_IN_SPI_FLASH
> +#define CONFIG_ENV_OFFSET0x4200
> +#define CONFIG_ENV_SIZE  0x4200
> +#define CONFIG_ENV_SECT_SIZE 0x210
> +#define CONFIG_ENV_SPI_MAX_HZ3000
> +#define CONFIG_BOOTCOMMAND   "sf probe 0; " \
> + "sf read 0x2200 0x84000 0x294000; " \
> + "bootm 0x2200"
>  #else /* CONFIG_SYS_USE_MMC */
>  /* bootstrap + u-boot + env + linux in mmc */
>  #define CONFIG_ENV_IS_IN_MMC

Applied to u-boot-arm/master, thanks!

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Moving from 1.1.6 to 2012.07 for Coldfire help

2013-01-12 Thread Steve deRosier
Hi all,

I'm stuck trying to get Linux to boot from U-Boot on a Coldfire system and
I'd love some ideas of what to try next.

I'm upgrading a uClinux system from a 2.4 kernel to 3.3. Additionally I'm
trying to upgrade the boot-loader from u-boot 1.1.6 to release 2012.07.
 The board is based on a MCF5235EVB. I did the Linux upgrade first, and
am successfully getting the existing system boot loader to boot my upgraded
Linux 3.3 images. Now I've moved on to upgrading u-boot.

I was able to get U-Boot to come up successfully and it recognizes my Linux
image and a bootm command starts just fine.  It does the checks,
uncompresses, and goes to boot.  I turned on the debug messages in U-Boot,
so I get the "## Transferring control to Linux (at address 0x2) ..."
message, it goes and does the jump and then...nothing...

Note that the exact same Linux image boots fine from 1.1.6.  My 1.1.6 can
boot both the 2.4 legacy image as well as my new 3.3 image.

Unfortunately I've got minimal visibility into the system (My BDM interface
is being a PITA, I've got assembly-only stepping, using
CodeWarrior!!@#!@$!, in flash only.  Pretty much nothing else other than
flash access is functioning right with the BDM at the moment), so I've
been relegated to debug-via-printf, which isn't terribly useful at the
interface between u-boot and linux.

Through reading code, I see a huge discrepancy between how 1.1.6 and
2012.07 starts the kernel.

1.1.6 uses a line:
 theKernel (linux_argc, linux_argv, linux_env, 0);

2012.07:
/*
 * Linux Kernel Parameters (passing board info data):
 *   sp+00: Ignore, side effect of using jsr to jump to kernel
 *   sp+04: ptr to board info data
 *   sp+08: initrd_start or 0 if no initrd
 *   sp+12: initrd_end - unused if initrd_start is 0
 *   sp+16: Start of command line string
 *   sp+20: End   of command line string
 */
(*kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end);

Clearly different... I'd assume that U-Boot's Linux starting magic is in
sync with the current Linux kernel, but if that's the case, and these are
actually as different as they appear, then the OLD U-Boot should have a
problem starting the NEW kernel also.  For grins, I grafted on the old
sequence code into the new U-Boot, but that (as expected) failed also.

I looked at the Coldfire startup code in Linux and it looks like it
corrosponds to the same comment in U-Boot, and interestingly it seems to
discard the bd_t structure that's passed in first.

So far I think I've figured this out:
* The FDT isn't used on Coldfire targets.
* The Coldfire code discards the bd_t data passed in through u-boot.
* Something funky is going on keeping Linux from booting, and it happens
early enough that I can't see it on the console.

If it makes a difference, for some reason we load kernel at 0x2 and
jump to 0x2. This is a legacy of the existing project, I've tried to
change it to 0x0, but that didn't help either. I had suspected it had to do
with where the old bootloader placed itself in RAM, but it shouldn't be an
issue with the new bootloader.

For reference:
RAM: 0x, 32MB
SRAM: 0x2000
MBAR: 0x4000
Flash: 0xFFC0, 4mb (second flash module at 0xFF80, but U-Boot
doesn't know about that one). Image is stored at 0xFFC4 and uses an
initrd romfs immedately after the kernel

Basic setup and design is similar to the 5235EVB.

CONFIG_UBOOT, MTD_UCLINUX and MTD_UCLINUX_EBSS are all Y.

I've been bashing my head against this wall all week, so I'd love it if
anyone's got some ideas.

Thanks,
- Steve

5235IWI> bootm 0xffc4
## Current stack ends at 0x01f2ca2c *  kernel: cmdline image address =
0xffc4
## Booting kernel from Legacy Image at ffc4 ...
   Image Name:   IWI 007
   Image Type:   M68K Linux Kernel Image (gzip compressed)
   Data Size:2270515 Bytes = 2.2 MiB
   Load Address: 0002
   Entry Point:  0002
   Verifying Checksum ... OK
   kernel data at 0xffc40040, len = 0x0022a533 (2270515)
## No init Ramdisk
   ramdisk start = 0x, ramdisk end = 0x
   Uncompressing Kernel Image ... OK
   kernel loaded at 0x0002, end = 0x00470404
## cmdline at 0x01f2c520 ... 0x01f2c520
## kernel board info at 0x01f2c4e0
memstart= 0x
memsize = 0x0200
flashstart  = 0xFFC0
flashsize   = 0x0040
flashoffset = 0x
sramstart   = 0x2000
sramsize= 0x0001
mbar= 0x4000
cpufreq =150 MHz
busfreq = 75 MHz
baudrate= 57600 bps
## initrd_high = 0x, copy_to_ram = 1
   ramdisk load start = 0x, ramdisk load end = 0x
## Transferring control to Linux (at address 0002) ...
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Running vanilla u-boot v2012.10 on Guruplug

2013-01-12 Thread Dirk Heinrichs
Hello,

I have compiled u-boot v2012.10 for my Guruplug and would like to test it from 
RAM before I write it to flash. So following instructions I found via internet 
search I load the u-boot.kwb from SATA disk into RAM at address 0x80 
(ext2load ide 0:1 0x80 u-boot.kwb) and then start it with "go 0x800200".

Unfortunately, this only restarts the running u-boot (v2012.04.01 from Debian) 
instead of starting the new one.

So my questions are:

1) Does running from RAM this way work at all?
2) If I can't test it from RAM, is it save to write it to flash anyway?

Thanks...

Dirk
-- 
Dirk Heinrichs 
Tel: +49 (0)2471 209385 | Mobil: +49 (0)176 34473913
GPG Public Key C2E467BB | Jabber: dirk.heinri...@altum.de


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 16/18 V2] mxs: Add MX23 olinuxino board support

2013-01-12 Thread Otavio Salvador
On Fri, Jan 11, 2013 at 9:27 PM, Marek Vasut  wrote:
> This patch adds support for MX23-based Olinuxino board.
>
> Signed-off-by: Marek Vasut 
> Cc: Fabio Estevam 
> Cc: Otavio Salvador 
> Cc: Stefano Babic 
> ---
>  MAINTAINERS  |1 +
>  board/olimex/mx23_olinuxino/Makefile |   47 +
>  board/olimex/mx23_olinuxino/mx23_olinuxino.c |   51 ++
>  board/olimex/mx23_olinuxino/spl_boot.c   |   90 +
>  boards.cfg   |1 +
>  include/configs/mx23_olinuxino.h |  133 
> ++
>  6 files changed, 323 insertions(+)
>  create mode 100644 board/olimex/mx23_olinuxino/Makefile
>  create mode 100644 board/olimex/mx23_olinuxino/mx23_olinuxino.c
>  create mode 100644 board/olimex/mx23_olinuxino/spl_boot.c
>  create mode 100644 include/configs/mx23_olinuxino.h
>
> V2: Add MAINTAINERS entry
> Remove CONFIG_MACH_TYPE (as this board is DT-only)

In fact it is not DT-only; we support it in linux-imx inside of OE and
the images provided by Olinex are also based 2.6.35 so it seems better
to define the machine type.

> diff --git a/MAINTAINERS b/MAINTAINERS
> index 36b47b7..08daa28 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -935,6 +935,7 @@ Marek Vasut 
> palmtc  xscale/pxa
> vpac270 xscale/pxa
> zipitz2 xscale/pxa
> +   mx23_olinuxino  i.MX23
> m28evk  i.MX28
> sc_sps_1i.MX28
>
> diff --git a/board/olimex/mx23_olinuxino/Makefile 
> b/board/olimex/mx23_olinuxino/Makefile
> new file mode 100644
> index 000..ff41cff
> --- /dev/null
> +++ b/board/olimex/mx23_olinuxino/Makefile
> @@ -0,0 +1,47 @@
> +#
> +# (C) Copyright 2000-2006
> +# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
> +#
> +# See file CREDITS for list of people who contributed to this
> +# project.
> +#
> +# This program is free software; you can redistribute it and/or
> +# modify it under the terms of the GNU General Public License as
> +# published by the Free Software Foundation; either version 2 of
> +# the License, or (at your option) any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write to the Free Software
> +# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> +# MA 02111-1307 USA
> +#
> +
> +include $(TOPDIR)/config.mk
> +
> +LIB= $(obj)lib$(BOARD).o
> +
> +ifndef CONFIG_SPL_BUILD
> +COBJS  := mx23_olinuxino.o
> +else
> +COBJS  := spl_boot.o
> +endif
> +
> +SRCS   := $(COBJS:.o=.c)
> +OBJS   := $(addprefix $(obj),$(COBJS))
> +
> +$(LIB):$(obj).depend $(OBJS)
> +   $(call cmd_link_o_target, $(OBJS))
> +
> +#
> +
> +# defines $(obj).depend target
> +include $(SRCTREE)/rules.mk
> +
> +sinclude $(obj).depend
> +
> +#
> diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c 
> b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
> new file mode 100644
> index 000..2fcad26
> --- /dev/null
> +++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
> @@ -0,0 +1,51 @@
> +/*
> + * Olimex MX23 Olinuxino board
> + *
> + * Copyright (C) 2013 Marek Vasut 
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +#include 
> +#include 
> +#include 
> +
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +/*
> + * Functions
> + */
> +int board_early_init_f(void)
> +{
> +   /* SSP clock init will come here soon. */
> +   return 0;
> +}
> +
> +int dram_init(void)
> +{
> +   return mxs_dram_init();
> +}
> +
> +int board_init(void)
> +{
> +   /* Adress of boot parameters */
> +   gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
> +
> +   return 0;
> +}
> diff --git a/board/olimex/mx23_olinuxino/spl_boot.c 
> b/board/olimex/mx23_olinuxino/spl_bo

Re: [U-Boot] [PATCH 16/18] mxs: Add MX23 olinuxino board support

2013-01-12 Thread Otavio Salvador
On Fri, Jan 11, 2013 at 9:27 PM, Marek Vasut  wrote:
> Dear Fabio Estevam,
>
>> Hi Marek,
>>
>> On Fri, Jan 11, 2013 at 11:19 AM, Marek Vasut  wrote:
>> > This patch adds support for MX23-based Olinuxino board.
>> >
>> > Signed-off-by: Marek Vasut 
>> > Cc: Fabio Estevam 
>> > Cc: Otavio Salvador 
>> > Cc: Stefano Babic 
>> > ---
>> >
>> >  board/olimex/mx23_olinuxino/Makefile |   47 +
>> >  board/olimex/mx23_olinuxino/mx23_olinuxino.c |   51 ++
>> >  board/olimex/mx23_olinuxino/spl_boot.c   |   90 +
>> >  boards.cfg   |1 +
>> >  include/configs/mx23_olinuxino.h |  136
>> >  ++
>>
>> You missed an entry in MAINTAINER file.
>>
>> >  5 files changed, 325 insertions(+)
>> >  create mode 100644 board/olimex/mx23_olinuxino/Makefile
>>
>> Can't we name it 'mx23olinuxino', without the underscore ?
>
> No, since there'll be a13_olinuxino etc. Is there any particular reason for 
> why
> you'd like to see this change?

it seems most boards dropped the underscore; we used to have mx53_loco
but now it is mx53loco so I think Fabio is right. I also prefer
without the underscore. You can have a13olinuxino later, I see no
problem with that.

--
Otavio Salvador O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854  http://projetos.ossystems.com.br
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mxs: Linux uses ttyAMA0 as DUART

2013-01-12 Thread Otavio Salvador
On Fri, Jan 11, 2013 at 9:29 PM, Marek Vasut  wrote:
> Replace use of ttyAM0 with ttyAMA0 as default serial console.
>
> Signed-off-by: Marek Vasut 
> Cc: Stefano Babic 

Please use the board name in the commit log.

--
Otavio Salvador O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854  http://projetos.ossystems.com.br
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Running vanilla u-boot v2012.10 on Guruplug

2013-01-12 Thread Wolfgang Denk
Dear Dirk Heinrichs,

In message <1457183.WG9k8kxG45@moria> you wrote:
> 
> 1) Does running from RAM this way work at all?
> 2) If I can't test it from RAM, is it save to write it to flash anyway?

Did you read the FAQ?  Especially
http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStartedInRAM
?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Life would be so much easier if everyone read the manual.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mxs: Linux uses ttyAMA0 as DUART

2013-01-12 Thread Marek Vasut
Dear Otavio Salvador,

> On Fri, Jan 11, 2013 at 9:29 PM, Marek Vasut  wrote:
> > Replace use of ttyAM0 with ttyAMA0 as default serial console.
> > 
> > Signed-off-by: Marek Vasut 
> > Cc: Stefano Babic 
> 
> Please use the board name in the commit log.

I think mxs is enough.

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 16/18] mxs: Add MX23 olinuxino board support

2013-01-12 Thread Marek Vasut
Dear Otavio Salvador,

> On Fri, Jan 11, 2013 at 9:27 PM, Marek Vasut  wrote:
> > Dear Fabio Estevam,
> > 
> >> Hi Marek,
> >> 
> >> On Fri, Jan 11, 2013 at 11:19 AM, Marek Vasut  wrote:
> >> > This patch adds support for MX23-based Olinuxino board.
> >> > 
> >> > Signed-off-by: Marek Vasut 
> >> > Cc: Fabio Estevam 
> >> > Cc: Otavio Salvador 
> >> > Cc: Stefano Babic 
> >> > ---
> >> > 
> >> >  board/olimex/mx23_olinuxino/Makefile |   47 +
> >> >  board/olimex/mx23_olinuxino/mx23_olinuxino.c |   51 ++
> >> >  board/olimex/mx23_olinuxino/spl_boot.c   |   90 +
> >> >  boards.cfg   |1 +
> >> >  include/configs/mx23_olinuxino.h |  136
> >> >  ++
> >> 
> >> You missed an entry in MAINTAINER file.
> >> 
> >> >  5 files changed, 325 insertions(+)
> >> >  create mode 100644 board/olimex/mx23_olinuxino/Makefile
> >> 
> >> Can't we name it 'mx23olinuxino', without the underscore ?
> > 
> > No, since there'll be a13_olinuxino etc. Is there any particular reason
> > for why you'd like to see this change?
> 
> it seems most boards dropped the underscore; we used to have mx53_loco
> but now it is mx53loco so I think Fabio is right. I also prefer
> without the underscore. You can have a13olinuxino later, I see no
> problem with that.

I believe it's confusing and it's a matter of taste.

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 16/18 V2] mxs: Add MX23 olinuxino board support

2013-01-12 Thread Marek Vasut
Dear Otavio Salvador,

> On Fri, Jan 11, 2013 at 9:27 PM, Marek Vasut  wrote:
> > This patch adds support for MX23-based Olinuxino board.
> > 
> > Signed-off-by: Marek Vasut 
> > Cc: Fabio Estevam 
> > Cc: Otavio Salvador 
> > Cc: Stefano Babic 
> > ---
> > 
> >  MAINTAINERS  |1 +
> >  board/olimex/mx23_olinuxino/Makefile |   47 +
> >  board/olimex/mx23_olinuxino/mx23_olinuxino.c |   51 ++
> >  board/olimex/mx23_olinuxino/spl_boot.c   |   90 +
> >  boards.cfg   |1 +
> >  include/configs/mx23_olinuxino.h |  133
> >  ++ 6 files changed, 323 insertions(+)
> >  create mode 100644 board/olimex/mx23_olinuxino/Makefile
> >  create mode 100644 board/olimex/mx23_olinuxino/mx23_olinuxino.c
> >  create mode 100644 board/olimex/mx23_olinuxino/spl_boot.c
> >  create mode 100644 include/configs/mx23_olinuxino.h
> > 
> > V2: Add MAINTAINERS entry
> > 
> > Remove CONFIG_MACH_TYPE (as this board is DT-only)
> 
> In fact it is not DT-only; we support it in linux-imx inside of OE and
> the images provided by Olinex are also based 2.6.35 so it seems better
> to define the machine type.

Can be added in a subsequent patch.
[...]

> > +/*
> > + * U-Boot general configurations
> > + */
> > +#defineCONFIG_SYS_LONGHELP
> > +#defineCONFIG_SYS_PROMPT   "=> "
> > +#defineCONFIG_SYS_CBSIZE   1024/* Console I/O
> > buffer size */
> 
> The  SYS_CBSIZE might be smaller I think; we use 256 in sabresd and
> others which have a much bigger environment so I think it could be
> reduced.

Can you elaborate what issues this causes please?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mxs: Linux uses ttyAMA0 as DUART

2013-01-12 Thread Otavio Salvador
On Sat, Jan 12, 2013 at 2:14 PM, Marek Vasut  wrote:
> Dear Otavio Salvador,
>
>> On Fri, Jan 11, 2013 at 9:29 PM, Marek Vasut  wrote:
>> > Replace use of ttyAM0 with ttyAMA0 as default serial console.
>> >
>> > Signed-off-by: Marek Vasut 
>> > Cc: Stefano Babic 
>>
>> Please use the board name in the commit log.
>
> I think mxs is enough.

I don't; you did not fix it for a SoC family neither it is a common
fix; You fixed it to m28evk only so it should be clear in the commit
log.


--
Otavio Salvador O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854  http://projetos.ossystems.com.br
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 01/10] arm: move flush_dcache_all() to just before disable cache

2013-01-12 Thread Simon Glass
Hi,

On Thu, Jan 10, 2013 at 11:59 PM, R Sricharan  wrote:
> Hi,
>
>
> On Saturday 01 December 2012 04:31 AM, Simon Glass wrote:
>>
>> From: Arun Mankuzhi 
>>
>> In Cortex-A15 architecture, when we run cache invalidate
>> the cache clean operation executes automatically.
>> So if there are any dirty cache lines before disabling the L2 cache
>> these will be synchronized with the main memory when
>> invalidate_dcache_all() runs in the last part of U-boot
>>
>> The two functions after flush_dcache_all is using the stack. So this
>> data will be on the cache. After disable when invalidate is called the
>> data will be flushed from cache to memory. This corrupts the stack in
>> invalida_dcache_all. So this change is required to avoid the u-boot
>> hang.
>>
>> So flush has to be done just before clearing CR_C bit
>>
>> Signed-off-by: Arun Mankuzhi 
>> Signed-off-by: Simon Glass 
>> ---
>> Changes in v2: None
>>
>>   arch/arm/lib/cache-cp15.c |5 -
>>   1 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
>> index 939de10..06119c8 100644
>> --- a/arch/arm/lib/cache-cp15.c
>> +++ b/arch/arm/lib/cache-cp15.c
>> @@ -124,8 +124,11 @@ static void cache_disable(uint32_t cache_bit)
>> return;
>> /* if disabling data cache, disable mmu too */
>> cache_bit |= CR_M;
>> -   flush_dcache_all();
>> }
>> +   reg = get_cr();
>> +   cp_delay();
>> +   if (cache_bit == (CR_C | CR_M))
>> +   flush_dcache_all();
>> set_cr(reg & ~cache_bit);
>
>  Sorry for the late question.
>  But are the two functions that is after flush_dcache_all currently ?
>
>  There is only set_cr, which does not use the stack.

I'm not sure I understand that comment, but Arun is copied on this
email and may have some further comment.

>
> Regards,
>  Sricharan
>
>

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 16/18 V2] mxs: Add MX23 olinuxino board support

2013-01-12 Thread Otavio Salvador
On Sat, Jan 12, 2013 at 2:16 PM, Marek Vasut  wrote:
> Dear Otavio Salvador,
>
>> On Fri, Jan 11, 2013 at 9:27 PM, Marek Vasut  wrote:
>> > This patch adds support for MX23-based Olinuxino board.
>> >
>> > Signed-off-by: Marek Vasut 
>> > Cc: Fabio Estevam 
>> > Cc: Otavio Salvador 
>> > Cc: Stefano Babic 
>> > ---
>> >
>> >  MAINTAINERS  |1 +
>> >  board/olimex/mx23_olinuxino/Makefile |   47 +
>> >  board/olimex/mx23_olinuxino/mx23_olinuxino.c |   51 ++
>> >  board/olimex/mx23_olinuxino/spl_boot.c   |   90 +
>> >  boards.cfg   |1 +
>> >  include/configs/mx23_olinuxino.h |  133
>> >  ++ 6 files changed, 323 insertions(+)
>> >  create mode 100644 board/olimex/mx23_olinuxino/Makefile
>> >  create mode 100644 board/olimex/mx23_olinuxino/mx23_olinuxino.c
>> >  create mode 100644 board/olimex/mx23_olinuxino/spl_boot.c
>> >  create mode 100644 include/configs/mx23_olinuxino.h
>> >
>> > V2: Add MAINTAINERS entry
>> >
>> > Remove CONFIG_MACH_TYPE (as this board is DT-only)
>>
>> In fact it is not DT-only; we support it in linux-imx inside of OE and
>> the images provided by Olinex are also based 2.6.35 so it seems better
>> to define the machine type.
>
> Can be added in a subsequent patch.
> [...]

I don't think it is the way to go for several reasons, mainly:

 * your v1 had this support
 * all sdcards provided by olimex use 2.6.35 kernel (until now)
 * the FSL supported kernel is non-DT

So I see no reason to not fix the patch, seriously.

>> > +/*
>> > + * U-Boot general configurations
>> > + */
>> > +#defineCONFIG_SYS_LONGHELP
>> > +#defineCONFIG_SYS_PROMPT   "=> "
>> > +#defineCONFIG_SYS_CBSIZE   1024/* Console I/O
>> > buffer size */
>>
>> The  SYS_CBSIZE might be smaller I think; we use 256 in sabresd and
>> others which have a much bigger environment so I think it could be
>> reduced.
>
> Can you elaborate what issues this causes please?

It causes nothing except more memory allocation than need. As other
bords work fine with less it seems a good option to move to a smaller
value. Just it.

--
Otavio Salvador O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854  http://projetos.ossystems.com.br
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V4 6/9] SMDK5250: Initialise and Enable DWMMC, support FDT and non-FDT

2013-01-12 Thread Simon Glass
Hi Amar,

On Fri, Jan 11, 2013 at 9:58 AM, Amarendra Reddy
 wrote:
> Hi Simon,
>
> Thanks for review comments.
> Please find my responses below.
>
> Thanks & Regards
> Amarendra Reddy
>
> On 10 January 2013 22:27, Simon Glass  wrote:
>>
>> Hi Amar,
>>
>> On Fri, Jan 4, 2013 at 1:34 AM, Amar  wrote:
>> > This patch enables and initialises DWMMC for SMDK5250.
>> > Supports both FDT and non-FDT. This patch creates a new file
>> > 'exynos5-dt.c' meant for FDT support.
>> > exynos5-dt.c:   This file shall contain all code which supports
>> > FDT.
>> > Any addition of FDT support for any module needs
>> > to be
>> > added in this file.
>> > smdk5250.c: This file shall contain the code which supports
>> > non-FDT.
>> > version. Any addition of non-FDT support for any
>> > module
>> > needs to be added in this file.
>> > May be, the file smdk5250.c can be removed in
>> > near future
>> > when non-FDT is not required.
>> >
>> > The Makefile is updated to compile only one of the files
>> > exynos5-dt.c / smdk5250.c based on FDT configuration.
>> >
>> > NOTE:
>> > Please note that all additions corresponding to FDT need to be added
>> > into the
>> > file exynos5-dt.c.
>> > At same time if non-FDT support is required then add the corresponding
>> > updations into smdk5250.c.
>> >
>> > Changes from V1:
>> > 1)A new file 'exynos5-dt.c' is created meant for FDT support
>> > 2)Makefile is updated to compile only one of the files
>> > exynos5-dt.c / smdk5250.c based on FDT configuration
>> >
>> > Changes from V2:
>> > 1)Updation of commit message and resubmition of proper patch
>> > set.
>> >
>> > Changes from V3:
>> > No change.
>> >
>> > Signed-off-by: Amar 
>> > ---
>> >  board/samsung/smdk5250/Makefile |   4 +
>> >  board/samsung/smdk5250/exynos5-dt.c | 242
>> > 
>> >  board/samsung/smdk5250/smdk5250.c   |  97 +++
>> >  include/configs/exynos5250-dt.h |   2 +
>> >  include/i2c.h   |   2 +
>> >  5 files changed, 292 insertions(+), 55 deletions(-)
>> >  create mode 100644 board/samsung/smdk5250/exynos5-dt.c
>> >
>> > diff --git a/board/samsung/smdk5250/Makefile
>> > b/board/samsung/smdk5250/Makefile
>> > index 47c6a5a..ecca9f3 100644
>> > --- a/board/samsung/smdk5250/Makefile
>> > +++ b/board/samsung/smdk5250/Makefile
>> > @@ -32,8 +32,12 @@ COBJS+= tzpc_init.o
>> >  COBJS  += smdk5250_spl.o
>> >
>> >  ifndef CONFIG_SPL_BUILD
>> > +ifdef CONFIG_OF_CONTROL
>> > +COBJS  += exynos5-dt.o
>> > +else
>> >  COBJS  += smdk5250.o
>> >  endif
>> > +endif
>> >
>> >  ifdef CONFIG_SPL_BUILD
>> >  COBJS  += spl_boot.o
>> > diff --git a/board/samsung/smdk5250/exynos5-dt.c
>> > b/board/samsung/smdk5250/exynos5-dt.c
>> > new file mode 100644
>> > index 000..da539ca
>> > --- /dev/null
>> > +++ b/board/samsung/smdk5250/exynos5-dt.c
>> > @@ -0,0 +1,242 @@
>> > +/*
>> > + * Copyright (C) 2012 Samsung Electronics
>> > + *
>> > + * See file CREDITS for list of people who contributed to this
>> > + * project.
>> > + *
>> > + * This program is free software; you can redistribute it and/or
>> > + * modify it under the terms of the GNU General Public License as
>> > + * published by the Free Software Foundation; either version 2 of
>> > + * the License, or (at your option) any later version.
>> > + *
>> > + * This program is distributed in the hope that it will be useful,
>> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> > + * GNU General Public License for more details.
>> > + *
>> > + * You should have received a copy of the GNU General Public License
>> > + * along with this program; if not, write to the Free Software
>> > + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
>> > + * MA 02111-1307 USA
>> > + */
>> > +
>> > +#include 
>> > +#include 
>> > +#include 
>> > +#include 
>> > +#include 
>> > +#include 
>> > +#include 
>> > +#include 
>> > +#include 
>> > +#include 
>> > +#include 
>> > +#include 
>> > +#include 
>> > +
>> > +DECLARE_GLOBAL_DATA_PTR;
>> > +
>> > +int board_init(void)
>> > +{
>> > +   gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
>> > +#ifdef CONFIG_EXYNOS_SPI
>> > +   spi_init();
>> > +#endif
>> > +   return 0;
>> > +}
>> > +
>> > +int dram_init(void)
>> > +{
>> > +   gd->ram_size= get_ram_size((long *)PHYS_SDRAM_1,
>> > PHYS_SDRAM_1_SIZE)
>> > +   + get_ram_size((long *)PHYS_SDRAM_2,
>> > PHYS_SDRAM_2_SIZE)
>> > +   + get_ram_size((long *)PHYS_SDRAM_3,
>> > PHYS_SDRAM_3_SIZE)
>> > +   + get_ram_size((long *)PHYS_SDRAM_4,
>> > PHYS_SDRAM_4_SIZE)
>> > +   + get_ram_size((long *)PHYS_SDRAM_5,
>> > PHYS_SDRAM_7_SIZE)
>> > + 

Re: [U-Boot] [PATCH v2 1/9] tegra: fdt: sort dts files

2013-01-12 Thread Simon Glass
On Sat, Jan 12, 2013 at 1:07 AM, Allen Martin  wrote:
> Sort nodes in dts files according the the following rules:
>
> 1) Any nodes that already exist in any /include/d file, in the order
> they appear in the /include/d file.
>
> 2) Any nodes with a reg property, in order of their address.
>
> 3) Any nodes without a reg property, alphabetically by node name.
>
> Signed-off-by: Allen Martin 

Acked-by: Simon Glass 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 16/18 V2] mxs: Add MX23 olinuxino board support

2013-01-12 Thread Marek Vasut
Dear Otavio Salvador,

> On Sat, Jan 12, 2013 at 2:16 PM, Marek Vasut  wrote:
> > Dear Otavio Salvador,
> > 
> >> On Fri, Jan 11, 2013 at 9:27 PM, Marek Vasut  wrote:
> >> > This patch adds support for MX23-based Olinuxino board.
> >> > 
> >> > Signed-off-by: Marek Vasut 
> >> > Cc: Fabio Estevam 
> >> > Cc: Otavio Salvador 
> >> > Cc: Stefano Babic 
> >> > ---
> >> > 
> >> >  MAINTAINERS  |1 +
> >> >  board/olimex/mx23_olinuxino/Makefile |   47 +
> >> >  board/olimex/mx23_olinuxino/mx23_olinuxino.c |   51 ++
> >> >  board/olimex/mx23_olinuxino/spl_boot.c   |   90 +
> >> >  boards.cfg   |1 +
> >> >  include/configs/mx23_olinuxino.h |  133
> >> >  ++ 6 files changed, 323 insertions(+)
> >> >  create mode 100644 board/olimex/mx23_olinuxino/Makefile
> >> >  create mode 100644 board/olimex/mx23_olinuxino/mx23_olinuxino.c
> >> >  create mode 100644 board/olimex/mx23_olinuxino/spl_boot.c
> >> >  create mode 100644 include/configs/mx23_olinuxino.h
> >> > 
> >> > V2: Add MAINTAINERS entry
> >> > 
> >> > Remove CONFIG_MACH_TYPE (as this board is DT-only)
> >> 
> >> In fact it is not DT-only; we support it in linux-imx inside of OE and
> >> the images provided by Olinex are also based 2.6.35 so it seems better
> >> to define the machine type.
> > 
> > Can be added in a subsequent patch.
> > [...]
> 
> I don't think it is the way to go for several reasons, mainly:
> 
>  * your v1 had this support

0x is DT boot ID really.

>  * all sdcards provided by olimex use 2.6.35 kernel (until now)
>  * the FSL supported kernel is non-DT
> 
> So I see no reason to not fix the patch, seriously.

Can you provide pointer to olinuxino machine entry in RMK's ID database then 
please?

> >> > +/*
> >> > + * U-Boot general configurations
> >> > + */
> >> > +#defineCONFIG_SYS_LONGHELP
> >> > +#defineCONFIG_SYS_PROMPT   "=> "
> >> > +#defineCONFIG_SYS_CBSIZE   1024/* Console I/O
> >> > buffer size */
> >> 
> >> The  SYS_CBSIZE might be smaller I think; we use 256 in sabresd and
> >> others which have a much bigger environment so I think it could be
> >> reduced.
> > 
> > Can you elaborate what issues this causes please?
> 
> It causes nothing except more memory allocation than need. As other
> bords work fine with less it seems a good option to move to a smaller
> value. Just it.

It reduces the size of console buffer, right?

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 8/9] tegra: add SPI SLINK driver

2013-01-12 Thread Simon Glass
Hi,

On Sat, Jan 12, 2013 at 1:07 AM, Allen Martin  wrote:
> Add driver for tegra SPI "SLINK" style driver.  This controller is
> similar to the tegra20 SPI "SFLASH" controller.  The difference is
> that the SLINK controller is a genernal purpose SPI controller and the
> SFLASH controller is special purpose and can only talk to FLASH
> devices.  In addition there are potentially many instances of an SLINK
> controller on tegra and only a single instance of SFLASH.  Tegra20 is
> currently ths only version of tegra that instantiates an SFLASH
> controller.
>
> This driver supports basic PIO mode of operation and is configurable
> (CONFIG_OF_CONTROL) to be driven off devicetree bindings.  Up to 4
> devices per controller may be attached, although typically only a
> single chip select line is exposed from tegra per controller so in
> reality this is usually limited to 1.
>
> To enable this driver, use CONFIG_TEGRA_SLINK

A few comments - note I am on holiday next week so please don't wait
for my response on the next version.

>
> Signed-off-by: Allen Martin 
> ---
>  arch/arm/include/asm/arch-tegra/tegra_slink.h |   84 +++
>  board/nvidia/common/board.c   |3 +-
>  drivers/spi/Makefile  |1 +
>  drivers/spi/tegra_slink.c |  335 
> +
>  include/fdtdec.h  |1 +
>  lib/fdtdec.c  |1 +
>  6 files changed, 424 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/include/asm/arch-tegra/tegra_slink.h
>  create mode 100644 drivers/spi/tegra_slink.c
>
> diff --git a/arch/arm/include/asm/arch-tegra/tegra_slink.h 
> b/arch/arm/include/asm/arch-tegra/tegra_slink.h
> new file mode 100644
> index 000..74804b5
> --- /dev/null
> +++ b/arch/arm/include/asm/arch-tegra/tegra_slink.h
> @@ -0,0 +1,84 @@
> +/*
> + * NVIDIA Tegra SPI-SLINK controller
> + *
> + * Copyright 2010-2013 NVIDIA Corporation
> + *
> + * This software may be used and distributed according to the
> + * terms of the GNU Public License, Version 2, incorporated
> + * herein by reference.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * Version 2 as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +#ifndef _TEGRA_SLINK_H_
> +#define _TEGRA_SLINK_H_
> +
> +#include 
> +
> +struct slink_tegra {
> +   u32 command;/* SLINK_COMMAND_0 register  */
> +   u32 command2;   /* SLINK_COMMAND2_0 reg */
> +   u32 status; /* SLINK_STATUS_0 register */
> +   u32 reserved;   /* Reserved offset 0C */
> +   u32 mas_data;   /* SLINK_MAS_DATA_0 reg */
> +   u32 slav_data;  /* SLINK_SLAVE_DATA_0 reg */
> +   u32 dma_ctl;/* SLINK_DMA_CTL_0 register */
> +   u32 status2;/* SLINK_STATUS2_0 reg */
> +   u32 rsvd[56];   /* 0x20 to 0xFF reserved */
> +   u32 tx_fifo;/* SLINK_TX_FIFO_0 reg off 100h */
> +   u32 rsvd2[31];  /* 0x104 to 0x17F reserved */
> +   u32 rx_fifo;/* SLINK_RX_FIFO_0 reg off 180h */
> +};
> +
> +/* COMMAND */
> +#define SLINK_CMD_ENB  (1 << 31)
> +#define SLINK_CMD_GO   (1 << 30)
> +#define SLINK_CMD_M_S  (1 << 28)
> +#define SLINK_CMD_CK_SDA   (1 << 21)
> +#define SLINK_CMD_CS_POL   (1 << 13)
> +#define SLINK_CMD_CS_VAL   (1 << 12)
> +#define SLINK_CMD_CS_SOFT  (1 << 11)
> +#define SLINK_CMD_BIT_LENGTH   (1 << 4)
> +#define SLINK_CMD_BIT_LENGTH_MASK  0x001F
> +/* COMMAND2 */
> +#define SLINK_CMD2_TXEN(1 << 30)
> +#define SLINK_CMD2_RXEN(1 << 31)
> +#define SLINK_CMD2_SS_EN   (1 << 18)
> +#define SLINK_CMD2_SS_EN_SHIFT 18
> +#define SLINK_CMD2_SS_EN_MASK  0x000C
> +#define SLINK_CMD2_CS_ACTIVE_BETWEEN   (1 << 17)
> +/* STATUS */
> +#define SLINK_STAT_BSY (1 << 31)
> +#define SLINK_STAT_RDY (1 << 30)
> +#define SLINK_STAT_ERR (1 << 29)
> +#define SLINK_STAT_RXF_FLUSH   (1 << 27)
> +#define SLINK_STAT_TXF_FLUSH   (1 << 26)
> +#define SLINK_STAT_RXF_OVF (1 << 25)
> +#define SLINK_STAT_TXF_UNR (1 << 24)
> +#define SLINK_STAT_RXF_EMPTY   (1 << 23)
> +#define SLINK_STAT_RXF_FULL(1 << 22)
> +#define SLINK_STAT_TXF_EMPTY   (1 << 21)
> +#define SLINK_STA

Re: [U-Boot] [PATCH v2 9/9] tegra: cardhu: config: enable SPI

2013-01-12 Thread Simon Glass
On Sat, Jan 12, 2013 at 1:07 AM, Allen Martin  wrote:
> Turn on SPI in cardhu config file
>
> Signed-off-by: Allen Martin 

Acked-by: Simon Glass 

> ---
>  include/configs/cardhu.h |   11 +++
>  1 file changed, 11 insertions(+)
>
> diff --git a/include/configs/cardhu.h b/include/configs/cardhu.h
> index aa725ba..1616b39 100644
> --- a/include/configs/cardhu.h
> +++ b/include/configs/cardhu.h
> @@ -49,6 +49,17 @@
>
>  #define CONFIG_ENV_IS_NOWHERE
>
> +/* SPI */
> +#define CONFIG_TEGRA_SLINK
> +#define CONFIG_TEGRA_SLINK_CTRLS   6
> +#define CONFIG_SPI_FLASH
> +#define CONFIG_SPI_FLASH_WINBOND
> +#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
> +#define CONFIG_SF_DEFAULT_SPEED2400
> +#define CONFIG_CMD_SPI
> +#define CONFIG_CMD_SF
> +#define CONFIG_SPI_FLASH_SIZE  (4 << 20)
> +
>  #include "tegra-common-post.h"
>
>  #endif /* __CONFIG_H */
> --
> 1.7.10.4
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 5/9] tegra30: add SBC1 to periph id mapping table

2013-01-12 Thread Simon Glass
On Sat, Jan 12, 2013 at 1:07 AM, Allen Martin  wrote:
> SBC1 is SPI controller 1 on tegra30
>
> Signed-off-by: Allen Martin 

Acked-by: Simon Glass 

> ---
>  arch/arm/cpu/tegra30-common/clock.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/cpu/tegra30-common/clock.c 
> b/arch/arm/cpu/tegra30-common/clock.c
> index c67a2e1..db5ac1e 100644
> --- a/arch/arm/cpu/tegra30-common/clock.c
> +++ b/arch/arm/cpu/tegra30-common/clock.c
> @@ -318,7 +318,7 @@ static s8 periph_id_to_internal_id[PERIPH_ID_COUNT] = {
>
> /* 40 */
> NONE(KFUSE),
> -   NONE(SBC1), /* SBC1, 0x34, is this SPI1? */
> +   PERIPHC_SBC1,
> PERIPHC_NOR,
> NONE(RESERVED43),
> PERIPHC_SBC2,
> --
> 1.7.10.4
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 7/9] tegra: add addresses of SPI SLINK controllers

2013-01-12 Thread Simon Glass
On Sat, Jan 12, 2013 at 1:07 AM, Allen Martin  wrote:
> Add I/O addresses of SPI SLINK controllers 1-6
>
> Signed-off-by: Allen Martin 

Acked-by: Simon Glass 

(optional thought below)

> ---
>  arch/arm/include/asm/arch-tegra/tegra.h |6 ++
>  1 file changed, 6 insertions(+)
>
> diff --git a/arch/arm/include/asm/arch-tegra/tegra.h 
> b/arch/arm/include/asm/arch-tegra/tegra.h
> index 67e6fd0..d2435c1 100644
> --- a/arch/arm/include/asm/arch-tegra/tegra.h
> +++ b/arch/arm/include/asm/arch-tegra/tegra.h
> @@ -40,6 +40,12 @@
>  #define NV_PA_APB_UARTE_BASE   (NV_PA_APB_MISC_BASE + 0x6400)
>  #define NV_PA_NAND_BASE(NV_PA_APB_MISC_BASE + 0x8000)
>  #define NV_PA_SPI_BASE (NV_PA_APB_MISC_BASE + 0xC380)
> +#define NV_PA_SLINK1_BASE  (NV_PA_APB_MISC_BASE + 0xD400)
> +#define NV_PA_SLINK2_BASE  (NV_PA_APB_MISC_BASE + 0xD600)
> +#define NV_PA_SLINK3_BASE  (NV_PA_APB_MISC_BASE + 0xD800)
> +#define NV_PA_SLINK4_BASE  (NV_PA_APB_MISC_BASE + 0xDA00)
> +#define NV_PA_SLINK5_BASE  (NV_PA_APB_MISC_BASE + 0xDC00)
> +#define NV_PA_SLINK6_BASE  (NV_PA_APB_MISC_BASE + 0xDE00)

Perhaps add #ifdef CONFIG_SPL_BUILD around this so people don't use it
accidentially?

>  #define TEGRA_DVC_BASE (NV_PA_APB_MISC_BASE + 0xD000)
>  #define NV_PA_PMC_BASE (NV_PA_APB_MISC_BASE + 0xE400)
>  #define NV_PA_EMC_BASE (NV_PA_APB_MISC_BASE + 0xF400)
> --
> 1.7.10.4
>

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 6/9] tegra30: fdt: add SPI SLINK nodes

2013-01-12 Thread Simon Glass
On Sat, Jan 12, 2013 at 1:07 AM, Allen Martin  wrote:
> Add tegra30 SPI SLINK nodes to fdt.
>
> Signed-off-by: Allen Martin 

Acked-by: Simon Glass 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fdt: fix dts preprocessor options

2013-01-12 Thread Simon Glass
On Tue, Jan 8, 2013 at 6:07 PM, Allen Martin  wrote:
> Using "-ansi" preprocessor option will cause dts lines that begin with
> '#' to choke the preprocessor.  Change to "-x assembler-with-cpp"
> instead which is what the kernel uses to preprocess dts files.
>
> Signed-off-by: Allen Martin 

Acked-by: Simon Glass 

Thanks for picking this up.

> ---
>  dts/Makefile |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dts/Makefile b/dts/Makefile
> index 785104e..922c78c 100644
> --- a/dts/Makefile
> +++ b/dts/Makefile
> @@ -36,7 +36,7 @@ $(error Your architecture does not have device tree support 
> enabled. \
>  Please define CONFIG_ARCH_DEVICE_TREE))
>
>  # We preprocess the device tree file provide a useful define
> -DTS_CPPFLAGS := -ansi \
> +DTS_CPPFLAGS := -x assembler-with-cpp \
> 
> -DARCH_CPU_DTS=\"$(SRCTREE)/arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\"
>  \
> 
> -DBOARD_DTS=\"$(SRCTREE)/board/$(VENDOR)/$(BOARD)/dts/$(DEVICE_TREE).dts\"
>
> --
> 1.7.10.4
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] common/lcd.c: cleanup use of global variables

2013-01-12 Thread Simon Glass
On Sat, Jan 5, 2013 at 11:45 AM, Wolfgang Denk  wrote:
> lcd_color_fg and lcd_color_bg had to be declared in board specific
> code, but were not actually used there; in addition, we have getter /
> setter functions for these, which were not used either.
>
> Get rid of the global variables, and use the getter function where
> needed (so far no setter calls are needed).
>
> Signed-off-by: Wolfgang Denk 
> Cc: Alessandro Rubini 
> Cc: Anatolij Gustschin 
> Cc: Bo Shen 
> Cc: Haavard Skinnemoen 
> Cc: Kyungmin Park 
> Cc: Marek Vasut 
> Cc: Minkyu Kang 
> Cc: Nikita Kiryanov 
> Cc: Simon Glass 
> Cc: Stelian Pop 
> Cc: Tom Warren 

Acked-by: Simon Glass 

> ---
>  arch/arm/cpu/pxa/pxafb.c  | 2 --
>  arch/powerpc/cpu/mpc8xx/lcd.c | 3 ---
>  board/mcc200/lcd.c| 3 ---
>  common/lcd.c  | 7 ---
>  drivers/video/amba.c  | 2 --
>  drivers/video/atmel_hlcdfb.c  | 2 --
>  drivers/video/atmel_lcdfb.c   | 2 --
>  drivers/video/exynos_fb.c | 2 --
>  drivers/video/tegra.c | 4 +---
>  include/lcd.h | 6 +++---
>  10 files changed, 8 insertions(+), 25 deletions(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 16/18 V2] mxs: Add MX23 olinuxino board support

2013-01-12 Thread Otavio Salvador
On Sat, Jan 12, 2013 at 2:52 PM, Marek Vasut  wrote:
> Dear Otavio Salvador,
>
>> On Sat, Jan 12, 2013 at 2:16 PM, Marek Vasut  wrote:
>> > Dear Otavio Salvador,
>> >
>> >> On Fri, Jan 11, 2013 at 9:27 PM, Marek Vasut  wrote:
>> >> > This patch adds support for MX23-based Olinuxino board.
>> >> >
>> >> > Signed-off-by: Marek Vasut 
>> >> > Cc: Fabio Estevam 
>> >> > Cc: Otavio Salvador 
>> >> > Cc: Stefano Babic 
>> >> > ---
>> >> >
>> >> >  MAINTAINERS  |1 +
>> >> >  board/olimex/mx23_olinuxino/Makefile |   47 +
>> >> >  board/olimex/mx23_olinuxino/mx23_olinuxino.c |   51 ++
>> >> >  board/olimex/mx23_olinuxino/spl_boot.c   |   90 +
>> >> >  boards.cfg   |1 +
>> >> >  include/configs/mx23_olinuxino.h |  133
>> >> >  ++ 6 files changed, 323 insertions(+)
>> >> >  create mode 100644 board/olimex/mx23_olinuxino/Makefile
>> >> >  create mode 100644 board/olimex/mx23_olinuxino/mx23_olinuxino.c
>> >> >  create mode 100644 board/olimex/mx23_olinuxino/spl_boot.c
>> >> >  create mode 100644 include/configs/mx23_olinuxino.h
>> >> >
>> >> > V2: Add MAINTAINERS entry
>> >> >
>> >> > Remove CONFIG_MACH_TYPE (as this board is DT-only)
>> >>
>> >> In fact it is not DT-only; we support it in linux-imx inside of OE and
>> >> the images provided by Olinex are also based 2.6.35 so it seems better
>> >> to define the machine type.
>> >
>> > Can be added in a subsequent patch.
>> > [...]
>>
>> I don't think it is the way to go for several reasons, mainly:
>>
>>  * your v1 had this support
>
> 0x is DT boot ID really.
>
>>  * all sdcards provided by olimex use 2.6.35 kernel (until now)
>>  * the FSL supported kernel is non-DT
>>
>> So I see no reason to not fix the patch, seriously.
>
> Can you provide pointer to olinuxino machine entry in RMK's ID database then
> please?

+imx233_olinuxino MACH_IMX233_OLINUXINO IMX233_OLINUXINO 4105

This is from the board patch.

>> >> > +/*
>> >> > + * U-Boot general configurations
>> >> > + */
>> >> > +#defineCONFIG_SYS_LONGHELP
>> >> > +#defineCONFIG_SYS_PROMPT   "=> "
>> >> > +#defineCONFIG_SYS_CBSIZE   1024/* Console I/O
>> >> > buffer size */
>> >>
>> >> The  SYS_CBSIZE might be smaller I think; we use 256 in sabresd and
>> >> others which have a much bigger environment so I think it could be
>> >> reduced.
>> >
>> > Can you elaborate what issues this causes please?
>>
>> It causes nothing except more memory allocation than need. As other
>> bords work fine with less it seems a good option to move to a smaller
>> value. Just it.
>
> It reduces the size of console buffer, right?

AFAIK yes.

--
Otavio Salvador O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854  http://projetos.ossystems.com.br
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] common/lcd.c: cleanup use of global variables

2013-01-12 Thread Simon Glass
Hi Jeroen,

On Sun, Jan 6, 2013 at 2:43 PM, Jeroen Hofstee  wrote:
> On 01/05/2013 08:50 PM, Wolfgang Denk wrote:
>>
>> Dear Anatolij,
>>
>> In message <1357415148-9243-1-git-send-email...@denx.de> you wrote:
>>>
>>> lcd_color_fg and lcd_color_bg had to be declared in board specific
>>> code, but were not actually used there; in addition, we have getter /
>>> setter functions for these, which were not used either.
>>>
>>> Get rid of the global variables, and use the getter function where
>>> needed (so far no setter calls are needed).
>>
>> A similar change could (and probably should?) be implemented for
>> lcd_base, too - but thjis requires a little more code changes, plus
>> the introduction of both getter and setter functions.
>>
>> Do you think this should be done?  If so, I would prepare a patch...
>> [Otherwise I'd save the effort...]
>
> yes I think it should be done, unless Anatolij has a really good reason
> these variables are defined all over the place.
>
> I have patches ready to remove allot more of these globals. Yet I have
> to test them. (and as this is cross arch / several patches this gona take
> some time)
>
> Simon: I intend to remove you cursors stuff from tegra since it is not
> used anywhere. What is the intention of the cursor stuff?

It can't be important - let's remove it.

>
> The amba driver is scheduled for removal as well since it is not used.
>
> Regards,
> Jeroen
>
Regards,

Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 16/18 V3] mxs: Add MX23 olinuxino board support

2013-01-12 Thread Marek Vasut
This patch adds support for MX23-based Olinuxino board.

Signed-off-by: Marek Vasut 
Cc: Fabio Estevam 
Cc: Otavio Salvador 
Cc: Stefano Babic 
---
 MAINTAINERS  |1 +
 board/olimex/mx23_olinuxino/Makefile |   47 +
 board/olimex/mx23_olinuxino/mx23_olinuxino.c |   51 ++
 board/olimex/mx23_olinuxino/spl_boot.c   |   90 +
 boards.cfg   |1 +
 include/configs/mx23_olinuxino.h |  135 ++
 6 files changed, 325 insertions(+)
 create mode 100644 board/olimex/mx23_olinuxino/Makefile
 create mode 100644 board/olimex/mx23_olinuxino/mx23_olinuxino.c
 create mode 100644 board/olimex/mx23_olinuxino/spl_boot.c
 create mode 100644 include/configs/mx23_olinuxino.h

V2: Add MAINTAINERS entry
Remove CONFIG_MACH_TYPE (as this board is DT-only)

V3: Re-add CONFIG_MACH_TYPE

diff --git a/MAINTAINERS b/MAINTAINERS
index 36b47b7..08daa28 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -935,6 +935,7 @@ Marek Vasut 
palmtc  xscale/pxa
vpac270 xscale/pxa
zipitz2 xscale/pxa
+   mx23_olinuxino  i.MX23
m28evk  i.MX28
sc_sps_1i.MX28
 
diff --git a/board/olimex/mx23_olinuxino/Makefile 
b/board/olimex/mx23_olinuxino/Makefile
new file mode 100644
index 000..ff41cff
--- /dev/null
+++ b/board/olimex/mx23_olinuxino/Makefile
@@ -0,0 +1,47 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+ifndef CONFIG_SPL_BUILD
+COBJS  := mx23_olinuxino.o
+else
+COBJS  := spl_boot.o
+endif
+
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c 
b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
new file mode 100644
index 000..2fcad26
--- /dev/null
+++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
@@ -0,0 +1,51 @@
+/*
+ * Olimex MX23 Olinuxino board
+ *
+ * Copyright (C) 2013 Marek Vasut 
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include 
+#include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * Functions
+ */
+int board_early_init_f(void)
+{
+   /* SSP clock init will come here soon. */
+   return 0;
+}
+
+int dram_init(void)
+{
+   return mxs_dram_init();
+}
+
+int board_init(void)
+{
+   /* Adress of boot parameters */
+   gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
+
+   return 0;
+}
diff --git a/board/olimex/mx23_olinuxino/spl_boot.c 
b/board/olimex/mx23_olinuxino/spl_boot.c
new file mode 100644
index 000..aaebe6c
--- /dev/null
+++ b/board/olimex/mx23_olinuxino/spl_boot.c
@@ -0,0 +1,90 @@
+/*
+ * Olimex MX23 Olinuxino Boot setup
+ *
+ * Copyright (C) 2013 Marek Vasut 
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 

[U-Boot] [RFC PATCH 0/4] RFC: FIT images and device tree on x86

2013-01-12 Thread Simon Glass
This little series adds support for booting FITs on x86. A FIT is a single
file that can contain a kernel, device tree and ramdisk.

This is a bit of an experiment, and is work in progress. I would like to
get feedback on the approach.

x86 kernels require a setup.bin file to boot. Rather than try to pack this
into the image in a clever way, this series just adds it as another image
in the FIT. At present compression is not supported for the setup binary.

The kernel image can be compressed using FIT's normal compression options,
such as bzip2 and lzo. U-Boot will decompress it as part of the 'bootm'
command.

More work is needed to make this implementation also support a zImage
(which contains a setup.bin and a compressed kernel in a single image), and
to pass the correct device tree binary to the kernel.

This series builds on the image and FIT code improvements that were
done for verified boot. The full series is available at:

http://git.denx.de/u-boot-x86.git

in branch 'setup'.


Simon Glass (4):
  x86: Enable LMB and RAMDISK_HIGH by default
  x86: Rewrite bootm.c to make it similar to ARM
  x86: Allow cmdline setup in setup_zimage() to be optional
  x86: Support loading kernel setup from a FIT

 arch/x86/include/asm/bootm.h  |   24 +
 arch/x86/include/asm/config.h |2 +
 arch/x86/lib/bootm.c  |  152 +
 arch/x86/lib/zimage.c |   37 +++-
 common/cmd_bootm.c|   22 +-
 common/image-fit.c|   20 +
 common/image.c|   11 +++
 doc/uImage.FIT/kernel.its |   50 +++
 doc/uImage.FIT/source_file_format.txt |   23 +++--
 include/bootstage.h   |3 +
 include/image.h   |   13 +++
 11 files changed, 285 insertions(+), 72 deletions(-)
 create mode 100644 arch/x86/include/asm/bootm.h

-- 
1.7.7.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [RFC PATCH 1/4] x86: Enable LMB and RAMDISK_HIGH by default

2013-01-12 Thread Simon Glass
These options are used by the image code. To allow us to use the generic
code more easily, define these for x86.

Signed-off-by: Simon Glass 
---
 arch/x86/include/asm/config.h |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/include/asm/config.h b/arch/x86/include/asm/config.h
index 049c44e..c60dba2 100644
--- a/arch/x86/include/asm/config.h
+++ b/arch/x86/include/asm/config.h
@@ -21,4 +21,6 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
+#define CONFIG_LMB
+#define CONFIG_SYS_BOOT_RAMDISK_HIGH
 #endif
-- 
1.7.7.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [RFC PATCH 4/4] x86: Support loading kernel setup from a FIT

2013-01-12 Thread Simon Glass
Add a new setup@ section to the FIT which can be used to provide a setup
binary for booting Linux on x86. This makes it possible to boot x86 from
a FIT.

Signed-off-by: Simon Glass 
---
 common/cmd_bootm.c|   22 +-
 common/image-fit.c|   20 +
 common/image.c|   11 +++
 doc/uImage.FIT/kernel.its |   50 +
 doc/uImage.FIT/source_file_format.txt |   23 --
 include/bootstage.h   |3 ++
 include/image.h   |   13 
 7 files changed, 130 insertions(+), 12 deletions(-)

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index de3dfc5..35fc4bf 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -215,6 +216,7 @@ static int bootm_start(cmd_tbl_t *cmdtp, int flag, int 
argc, char * const argv[]
 
images.os.end = image_get_image_end(os_hdr);
images.os.load = image_get_load(os_hdr);
+   images.os.arch = image_get_arch(os_hdr);
break;
 #if defined(CONFIG_FIT)
case IMAGE_FORMAT_FIT:
@@ -239,6 +241,12 @@ static int bootm_start(cmd_tbl_t *cmdtp, int flag, int 
argc, char * const argv[]
return 1;
}
 
+   if (fit_image_get_arch(images.fit_hdr_os,
+   images.fit_noffset_os, &images.os.arch)) {
+   puts("Can't get image ARCH!\n");
+   return 1;
+   }
+
images.os.end = fit_get_end(images.fit_hdr_os);
 
if (fit_image_get_load(images.fit_hdr_os, images.fit_noffset_os,
@@ -254,8 +262,18 @@ static int bootm_start(cmd_tbl_t *cmdtp, int flag, int 
argc, char * const argv[]
return 1;
}
 
-   /* find kernel entry point */
-   if (images.legacy_hdr_valid) {
+   /* If we have a valid setup.bin, we will use that for entry (x86) */
+   if (images.os.arch == IH_ARCH_I386) {
+   ulong len;
+
+   puts("Looking for setup\n");
+   ret = boot_get_setup(&images, IH_ARCH_I386, &images.ep, &len);
+   if (ret < 0 && ret != -ENOENT) {
+   puts("Could not find a valid setup.bin for x86n");
+   return 1;
+   }
+   /* Kernel entry point is the setup.bin */
+   } else if (images.legacy_hdr_valid) {
images.ep = image_get_ep(&images.legacy_hdr_os_copy);
 #if defined(CONFIG_FIT)
} else if (images.fit_uname_os) {
diff --git a/common/image-fit.c b/common/image-fit.c
index 9f3ece2..04093a0 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -1654,3 +1654,23 @@ int fit_image_load(bootm_headers_t *images, const char 
*prop_name, ulong addr,
 
return noffset;
 }
+
+int boot_get_setup_fit(bootm_headers_t *images, uint8_t arch,
+   ulong *setup_start, ulong *setup_len)
+{
+   int noffset;
+   ulong addr;
+   ulong len;
+   int ret;
+
+   addr = map_to_sysmem(images->fit_hdr_os);
+   noffset = fit_get_node_from_config(images, FIT_SETUP_PROP, addr);
+   if (noffset < 0)
+   return noffset;
+
+   ret = fit_image_load(images, FIT_SETUP_PROP, addr, NULL, NULL,
+   arch, IH_TYPE_X86_SETUP, BOOTSTAGE_ID_FIT_SETUP_START,
+   FIT_LOAD_REQUIRED, setup_start, &len);
+
+   return ret;
+}
diff --git a/common/image.c b/common/image.c
index 26b9653..7c44bc7 100644
--- a/common/image.c
+++ b/common/image.c
@@ -151,6 +151,7 @@ static const table_entry_t uimage_type[] = {
{   IH_TYPE_SCRIPT, "script", "Script", },
{   IH_TYPE_STANDALONE, "standalone", "Standalone Program", },
{   IH_TYPE_UBLIMAGE,   "ublimage",   "Davinci UBL image",},
+   {   IH_TYPE_X86_SETUP,  "x86_setup",  "x86 setup.bin",},
{   -1, "",   "",   },
 };
 
@@ -1064,6 +1065,16 @@ error:
 }
 #endif /* CONFIG_SYS_BOOT_RAMDISK_HIGH */
 
+int boot_get_setup(bootm_headers_t *images, uint8_t arch,
+  ulong *setup_start, ulong *setup_len)
+{
+#if defined(CONFIG_FIT)
+   return boot_get_setup_fit(images, arch, setup_start, setup_len);
+#else
+   return -ENOENT;
+#endif
+}
+
 #ifdef CONFIG_SYS_BOOT_GET_CMDLINE
 /**
  * boot_get_cmdline - allocate and initialize kernel cmdline
diff --git a/doc/uImage.FIT/kernel.its b/doc/uImage.FIT/kernel.its
index ef3ab8f..1b662aa 100644
--- a/doc/uImage.FIT/kernel.its
+++ b/doc/uImage.FIT/kernel.its
@@ -35,3 +35,53 @@
};
};
 };
+
+
+
+For x86 a setup node is also required:
+
+/dts-v1/;
+
+/ {
+   description = "Simple image with single Linux kernel on x86";
+   #address-cells = <1>;
+
+   images {
+   kernel@1

[U-Boot] [RFC PATCH 3/4] x86: Allow cmdline setup in setup_zimage() to be optional

2013-01-12 Thread Simon Glass
If we are passing this using the device tree then we may not want to
set this up here. TBD.

Signed-off-by: Simon Glass 
---
 arch/x86/lib/zimage.c |   21 -
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index 8819afd..9fc450a 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -269,18 +269,21 @@ int setup_zimage(struct boot_params *setup_base, char 
*cmd_line, int auto_boot,
hdr->loadflags |= HEAP_FLAG;
}
 
-   if (bootproto >= 0x0202) {
-   hdr->cmd_line_ptr = (uintptr_t)cmd_line;
-   } else if (bootproto >= 0x0200) {
-   setup_base->screen_info.cl_magic = COMMAND_LINE_MAGIC;
-   setup_base->screen_info.cl_offset =
-   (uintptr_t)cmd_line - (uintptr_t)setup_base;
+   if (cmd_line) {
+   if (bootproto >= 0x0202) {
+   hdr->cmd_line_ptr = (uintptr_t)cmd_line;
+   } else if (bootproto >= 0x0200) {
+   setup_base->screen_info.cl_magic = COMMAND_LINE_MAGIC;
+   setup_base->screen_info.cl_offset =
+   (uintptr_t)cmd_line - (uintptr_t)setup_base;
+
+   hdr->setup_move_size = 0x9100;
+   }
 
-   hdr->setup_move_size = 0x9100;
+   /* build command line at COMMAND_LINE_OFFSET */
+   build_command_line(cmd_line, auto_boot);
}
 
-   /* build command line at COMMAND_LINE_OFFSET */
-   build_command_line(cmd_line, auto_boot);
return 0;
 }
 
-- 
1.7.7.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [RFC PATCH 2/4] x86: Rewrite bootm.c to make it similar to ARM

2013-01-12 Thread Simon Glass
The x86 bootm code is quite special, and geared to zimage. Adjust it
to support device tree and make it more like the ARM code, with
separate bootm stages and functions for each stage.

Create a function announce_and_cleanup() to handle printing the
"Starting kernel ..." message and put it in bootm so it is in one
place and can be used by any loading code. Also move the
board_final_cleanup() function into bootm.

Signed-off-by: Simon Glass 
---
 arch/x86/include/asm/bootm.h |   24 +++
 arch/x86/lib/bootm.c |  152 +++--
 arch/x86/lib/zimage.c|   16 +
 3 files changed, 141 insertions(+), 51 deletions(-)
 create mode 100644 arch/x86/include/asm/bootm.h

diff --git a/arch/x86/include/asm/bootm.h b/arch/x86/include/asm/bootm.h
new file mode 100644
index 000..abc90e3
--- /dev/null
+++ b/arch/x86/include/asm/bootm.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2013, Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+#ifndef ARM_BOOTM_H
+#define ARM_BOOTM_H
+
+void bootm_announce_and_cleanup(void);
+
+#endif
diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
index 83caf6b..72f571d 100644
--- a/arch/x86/lib/bootm.c
+++ b/arch/x86/lib/bootm.c
@@ -26,84 +26,162 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#ifdef CONFIG_SYS_COREBOOT
+#include 
+#endif
 
 #define COMMAND_LINE_OFFSET 0x9000
 
-/*cmd_boot.c*/
-int do_bootm_linux(int flag, int argc, char * const argv[],
-   bootm_headers_t *images)
+/*
+ * Implement a weak default function for boards that optionally
+ * need to clean up the system before jumping to the kernel.
+ */
+__weak void board_final_cleanup(void)
 {
-   struct boot_params *base_ptr = NULL;
-   ulong os_data, os_len;
-   image_header_t *hdr;
-   void *load_address;
+}
 
-#if defined(CONFIG_FIT)
-   const void  *data;
-   size_t  len;
+void bootm_announce_and_cleanup(void)
+{
+   printf("\nStarting kernel ...\n\n");
+
+#ifdef CONFIG_SYS_COREBOOT
+   timestamp_add_now(TS_U_BOOT_START_KERNEL);
 #endif
+   bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
+   board_final_cleanup();
+}
 
-   if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
-   return 1;
+#if defined(CONFIG_OF_LIBFDT) && !defined(CONFIG_OF_NO_KERNEL)
+static int fixup_memory_node(void *blob)
+{
+   bd_t*bd = gd->bd;
+   int bank;
+   u64 start[CONFIG_NR_DRAM_BANKS];
+   u64 size[CONFIG_NR_DRAM_BANKS];
+
+   for (bank = 0; bank < CONFIG_NR_DRAM_BANKS; bank++) {
+   start[bank] = bd->bi_dram[bank].start;
+   size[bank] = bd->bi_dram[bank].size;
+   }
 
+   return fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS);
+}
+#endif
+
+/* Subcommand: PREP */
+static int boot_prep_linux(bootm_headers_t *images)
+{
+   char *cmd_line_dest = NULL;
+   image_header_t *hdr;
+   int is_zimage = 0;
+   void *data = NULL;
+   size_t len;
+   int ret;
+
+#ifdef CONFIG_OF_LIBFDT
+   if (images->ft_len) {
+   debug("using: FDT\n");
+   if (image_create_fdt(images)) {
+   puts("FDT creation failed! hanging...");
+   hang();
+   }
+   }
+#endif
if (images->legacy_hdr_valid) {
hdr = images->legacy_hdr_os;
if (image_check_type(hdr, IH_TYPE_MULTI)) {
+   ulong os_data, os_len;
+
/* if multi-part image, we need to get first subimage */
image_multi_getimg(hdr, 0, &os_data, &os_len);
+   data = (void *)os_data;
+   len = os_len;
} else {
/* otherwise get image data */
-   os_data = image_get_data(hdr);
-   os_len = image_get_data_size(hdr);
+   data = (void *)image_get_data(hdr);
+   len = image_get_data_size(hdr);
}
+   is_zimage = 1;
 #if defined(CONFIG_FIT)
-   } else if (images->fit_uname_os) {
+   } else if (images->fit_uname_setup) {
+   /* The entry point is already set */
+   } els

[U-Boot] [PATCH] MIPS: bootm.c: drop obsolete Qemu specific bootm implementation

2013-01-12 Thread daniel . schwierzeck
From: Daniel Schwierzeck 

The Qemu specific bootm implementation was intended for a special
Qemu target in Linux kernel. But this target has been dropped in
v2.6.25-rc1 by commit 302922e5f6901eb6f29c58539631f71b3d9746b8

Author: Ralf Baechle 
Date:   Tue Jan 29 10:15:02 2008 +

[MIPS] Qemu: Remove platform.

The Qemu platform was originally implemented to have an easily supportable
platform until Qemu reaches a state where it emulates a real world system.
Since the latest release Qemu is capable of emulating the MIPSsim and
Malta platforms, so this goal has been reached.  The Qemu plaform is also
rather underfeatured so less useful than a Malta emulation.

Thus the special bootm implementation is obsolete by now and can be
dropped. The Qemu support in U-Boot should be converted to MIPS Malta
to support booting of Linux kernels.

Signed-off-by: Gabor Juhos 
Signed-off-by: Daniel Schwierzeck 
---
 arch/mips/lib/Makefile  |  4 ---
 arch/mips/lib/bootm_qemu_mips.c | 78 -
 2 files changed, 82 deletions(-)
 delete mode 100644 arch/mips/lib/bootm_qemu_mips.c

diff --git a/arch/mips/lib/Makefile b/arch/mips/lib/Makefile
index 967e98a..a68a564 100644
--- a/arch/mips/lib/Makefile
+++ b/arch/mips/lib/Makefile
@@ -35,11 +35,7 @@ LGOBJS   := $(addprefix $(obj),$(GLSOBJS))
 SOBJS-y+=
 
 COBJS-y+= board.o
-ifeq ($(CONFIG_QEMU_MIPS),y)
-COBJS-y+= bootm_qemu_mips.o
-else
 COBJS-y+= bootm.o
-endif
 
 SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
 OBJS   := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
diff --git a/arch/mips/lib/bootm_qemu_mips.c b/arch/mips/lib/bootm_qemu_mips.c
deleted file mode 100644
index 0815c9c..000
--- a/arch/mips/lib/bootm_qemu_mips.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * (C) Copyright 2008
- * Jean-Christophe PLAGNIOL-VILLARD 
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-
-DECLARE_GLOBAL_DATA_PTR;
-
-int do_bootm_linux(int flag, int argc, char * const argv[],
-   bootm_headers_t *images)
-{
-   void (*theKernel) (int, char **, char **, int *);
-   char *bootargs = getenv("bootargs");
-   char *start;
-   uint len;
-
-   /* find kernel entry point */
-   theKernel = (void (*)(int, char **, char **, int *))images->ep;
-
-   bootstage_mark(BOOTSTAGE_ID_RUN_OS);
-
-   debug("## Transferring control to Linux (at address %08lx) ...\n",
-   (ulong) theKernel);
-
-   gd->bd->bi_boot_params = gd->bd->bi_memstart + (16 << 20) - 256;
-   debug("%-12s= 0x%08lX\n", "boot_params", (ulong)gd->bd->bi_boot_params);
-
-   /* set Magic */
-   *(int32_t *)(gd->bd->bi_boot_params - 4) = 0x12345678;
-   /* set ram_size */
-   *(int32_t *)(gd->bd->bi_boot_params - 8) = gd->ram_size;
-
-   start = (char *)gd->bd->bi_boot_params;
-
-   len = strlen(bootargs);
-
-   strncpy(start, bootargs, len + 1);
-
-   start += len;
-
-   len = images->rd_end - images->rd_start;
-   if (len > 0) {
-   start += sprintf(start, " rd_start=0x%08X rd_size=0x%0X",
-   (uint) UNCACHED_SDRAM(images->rd_start),
-   (uint) len);
-   }
-
-   /* we assume that the kernel is in place */
-   printf("\nStarting kernel ...\n\n");
-
-   theKernel(0, NULL, NULL, 0);
-
-   /* does not return */
-   return 1;
-}
-- 
1.8.0.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MIPS: bootm.c: drop obsolete Qemu specific bootm implementation

2013-01-12 Thread Gabor Juhos
Hi Daniel,

> From: Daniel Schwierzeck 
> 
> The Qemu specific bootm implementation was intended for a special
> Qemu target in Linux kernel. But this target has been dropped in
> v2.6.25-rc1 by commit 302922e5f6901eb6f29c58539631f71b3d9746b8
> 
> Author: Ralf Baechle 
> Date:   Tue Jan 29 10:15:02 2008 +
> 
> [MIPS] Qemu: Remove platform.
> 
> The Qemu platform was originally implemented to have an easily supportable
> platform until Qemu reaches a state where it emulates a real world system.
> Since the latest release Qemu is capable of emulating the MIPSsim and
> Malta platforms, so this goal has been reached.  The Qemu plaform is also
> rather underfeatured so less useful than a Malta emulation.
> 
> Thus the special bootm implementation is obsolete by now and can be
> dropped. The Qemu support in U-Boot should be converted to MIPS Malta
> to support booting of Linux kernels.

After this change, the qemu-mips board support will be broken, so the whole
qemu-mips stuff should be removed with the same change IMHO. Alternatively, this
should be kept until the qemu-malta support is not ready.

-Gabor
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] README.qemu-mips: move README file from board to doc directory

2013-01-12 Thread daniel . schwierzeck
From: Daniel Schwierzeck 

Signed-off-by: Daniel Schwierzeck 
---
 board/qemu-mips/README => doc/README.qemu-mips | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename board/qemu-mips/README => doc/README.qemu-mips (100%)

diff --git a/board/qemu-mips/README b/doc/README.qemu-mips
similarity index 100%
rename from board/qemu-mips/README
rename to doc/README.qemu-mips
-- 
1.8.0.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] README.mips: update known issues and TODOs

2013-01-12 Thread daniel . schwierzeck
From: Daniel Schwierzeck 

Signed-off-by: Daniel Schwierzeck 
---
 doc/README.mips | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/doc/README.mips b/doc/README.mips
index 85dea40..f4f770b 100644
--- a/doc/README.mips
+++ b/doc/README.mips
@@ -16,11 +16,6 @@ Toolchains
 Known Issues
 
 
-  * Little endian build problem
-
-If use non-ELDK toolchains, -EB will be set to CPPFLAGS. Therefore all
-objects will be generated in big-endian format.
-
   * Cache incoherency issue caused by do_bootelf_exec() at cmd_elf.c
 
 Cache will be disabled before entering the loaded ELF image without
@@ -55,3 +50,9 @@ TODOs
   * Due to cache initialization issues, the DRAM on board must be
 initialized in board specific assembler language before the cache init
 code is run -- that is, initialize the DRAM in lowlevel_init().
+
+  * get rid of CONFIG_MANUAL_RELOC
+
+  * centralize/share more CPU code of MIPS32, MIPS64 and XBurst
+
+  * support Qemu Malta
-- 
1.8.0.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Running vanilla u-boot v2012.10 on Guruplug

2013-01-12 Thread Dirk Heinrichs
Am Samstag 12 Januar 2013, 16:51:51 schrieb Wolfgang Denk:

> Did you read the FAQ?  Especially
> http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStarted
> InRAM ?

Now I did :) Thanx a lot.

Interesting that [1] states it's possible, though...

Bye...

Dirk

[1]: https://doukki.net/doku.php?id=wiki:tutoriels:uboot.howto
-- 
Dirk Heinrichs 
Tel: +49 (0)2471 209385 | Mobil: +49 (0)176 34473913
GPG Public Key C2E467BB | Jabber: dirk.heinri...@altum.de


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Googlers please reply: commiters in U-Boot

2013-01-12 Thread Simon Glass
Hi,

You are being copied because you have written U-Boot code which is now
in mainline.

The chromium.org domain does not automatically attribute U-Boot
commits by company. Each author needs to be manually added to the list
and this can only be done if you confirm your employer.

So, if you are on the CC list and work at Google, please reply-all
with a quick email stating this (without top posting).

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Googlers please reply: commiters in U-Boot

2013-01-12 Thread Vadim Bendebury
On Sat, Jan 12, 2013 at 9:20 AM, Simon Glass  wrote:
> Hi,
>
> You are being copied because you have written U-Boot code which is now
> in mainline.
>
> The chromium.org domain does not automatically attribute U-Boot
> commits by company. Each author needs to be manually added to the list
> and this can only be done if you confirm your employer.
>
> So, if you are on the CC list and work at Google, please reply-all
> with a quick email stating this (without top posting).
>
> Regards,
> Simon

All emails from vben...@chromium.org come from me while I work for Google.

Vadim Bendebury
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Googlers please reply: commiters in U-Boot

2013-01-12 Thread Vincent Palatin
On Jan 12, 2013 9:20 AM, "Simon Glass"  wrote:
>
> Hi,
>
> You are being copied because you have written U-Boot code which is now
> in mainline.
>
> The chromium.org domain does not automatically attribute U-Boot
> commits by company. Each author needs to be manually added to the list
> and this can only be done if you confirm your employer.
>
> So, if you are on the CC list and work at Google, please reply-all
> with a quick email stating this (without top posting).

I work for Google and my CLs signed by vpala...@chromium.org can be
attributed to Google Inc.

Thanks Simon.
--
Vincent
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Running vanilla u-boot v2012.10 on Guruplug

2013-01-12 Thread Jason
On Sat, Jan 12, 2013 at 08:41:36PM +0100, Dirk Heinrichs wrote:
> Am Samstag 12 Januar 2013, 16:51:51 schrieb Wolfgang Denk:
> 
> > Did you read the FAQ?  Especially
> > http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStarted
> > InRAM ?
> 
> Now I did :) Thanx a lot.
> 
> Interesting that [1] states it's possible, though...

With the dreamplug, I often load u-boot into RAM via the JTAG (0x060
and 0x080), and then 'resume 0x060'.  Then use the u-boot
running from 0x060 to burn the image to SPI flash from 0x080.
But that's loaded via the JTAG, not from a running u-boot.

I think I posted instructions to this mailinglist a while ago about
this.  If you have the JTAG (it's only $35US), I would advise trying
that.

thx,

Jason.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Running vanilla u-boot v2012.10 on Guruplug

2013-01-12 Thread Jeroen Hofstee

On 01/12/2013 09:41 PM, Jason wrote:

On Sat, Jan 12, 2013 at 08:41:36PM +0100, Dirk Heinrichs wrote:

Am Samstag 12 Januar 2013, 16:51:51 schrieb Wolfgang Denk:


Did you read the FAQ?  Especially
http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStarted
InRAM ?

Now I did :) Thanx a lot.

Interesting that [1] states it's possible, though...

With the dreamplug, I often load u-boot into RAM via the JTAG (0x060
and 0x080), and then 'resume 0x060'.  Then use the u-boot
running from 0x060 to burn the image to SPI flash from 0x080.
But that's loaded via the JTAG, not from a running u-boot.

I think I posted instructions to this mailinglist a while ago about
this.  If you have the JTAG (it's only $35US), I would advise trying
that.


For what is worth, I can confirm above for the dreamplug..
I wrote this down a once...:

cd /where/uboot_is
sudo openocd -f /usr/share/openocd/scripts/board/sheevaplug.cfg

# other console
telnet localhost 
sheevaplug_init
load_image u-boot
load_image u-boot.kwb 0x080

resume 0x060
# and hit stop in the serial terminal

no Idea about the guruplug though..

Regards,
Jeroen

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/3] pxa: Add support for board specific reset function

2013-01-12 Thread Lukasz Dalek
Some boards have its own way to reset board. This patch adds support for
board_reset() function which is called from reset_cpu() to do board
specific actions before/instead main reset_cpu() actions.

Signed-off-by: Lukasz Dalek 
---
 arch/arm/cpu/pxa/pxa2xx.c |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c
index 09e8177..5520f4f 100644
--- a/arch/arm/cpu/pxa/pxa2xx.c
+++ b/arch/arm/cpu/pxa/pxa2xx.c
@@ -284,12 +284,19 @@ void i2c_clk_enable(void)
writel(readl(CKEN) | CKEN14_I2C, CKEN);
 }
 
+void __attribute__((weak)) board_reset(void)
+{
+   /* do nothing */
+}
+
 void reset_cpu(ulong ignored) __attribute__((noreturn));
 
 void reset_cpu(ulong ignored)
 {
uint32_t tmp;
 
+   board_reset();
+
setbits_le32(OWER, OWER_WME);
 
tmp = readl(OSCR);
-- 
1.7.8.6

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 00/10] common.lcd: remove globals and cleanup

2013-01-12 Thread Jeroen Hofstee
As mentioned in http://lists.denx.de/pipermail/u-boot/2013-January/143459.html
there does not seem to be a good reason why the frame buffer driver
provide the variables for the lcd internal logic. So lets just remove it.
If there is any good reason for a framebuffer driver to "call up" it should
do so by a function call and not change the lcd its internal state (and
there is actually none doing so at the moment).

This patchset first removes unused drivers and places drivers useing
common/lcd.c in drivers/video. Then removes the unneeded globals and
thereafter finishes with some cleanups.

This patch goes after http://patchwork.ozlabs.org/patch/209692/
"common/lcd.c: cleanup use of global variables"

Jeroen Hofstee (10):
  lcd, amba: remove this frame buffer driver since it is not used
  lcd, tegra: remove unused cursor functions
  lcd, mpc8xx: move the mpc8xx frame buffer driver to drivers/video
  lcd, pxafb: move the pxafb to drivers/video
  common/lcd.c: cleanup use of global variables
  common/lcd.c: remove global lcd_base
  common/lcd: cosmetic: clean up a bit
  lcd, fb: cleanup, remove prototypes already in lcd.h and unused code
  api/api_display: use the getters for console size info
  common/lcd.c: move the macro's to the c file

 api/api_display.c|4 +-
 arch/arm/cpu/pxa/Makefile|1 -
 arch/arm/cpu/pxa/pxafb.c |  650 --
 arch/powerpc/cpu/mpc8xx/Makefile |1 -
 arch/powerpc/cpu/mpc8xx/lcd.c|  618 
 board/mcc200/lcd.c   |   21 +-
 common/lcd.c |  117 ---
 drivers/video/Makefile   |3 +-
 drivers/video/amba.c |   77 -
 drivers/video/atmel_hlcdfb.c |8 -
 drivers/video/atmel_lcdfb.c  |8 -
 drivers/video/exynos_fb.c|   14 +-
 drivers/video/mpc8xx_lcd.c   |  564 +
 drivers/video/pxa_lcd.c  |  609 +++
 drivers/video/tegra.c|   64 +---
 include/configs/R360MPI.h|1 +
 include/configs/RBC823.h |1 +
 include/configs/RPXlite_DW.h |1 +
 include/configs/RRvision.h   |4 +-
 include/configs/TQM823L.h|1 +
 include/configs/TQM823M.h|1 +
 include/configs/lubbock.h|1 +
 include/configs/lwmon.h  |1 +
 include/configs/palmld.h |1 +
 include/configs/palmtc.h |1 +
 include/configs/pxa255_idp.h |1 +
 include/configs/svm_sc8xx.h  |1 +
 include/configs/v37.h|1 +
 include/configs/zipitz2.h|1 +
 include/lcd.h|   71 +
 30 files changed, 1280 insertions(+), 1567 deletions(-)
 delete mode 100644 arch/arm/cpu/pxa/pxafb.c
 delete mode 100644 arch/powerpc/cpu/mpc8xx/lcd.c
 delete mode 100644 drivers/video/amba.c
 create mode 100644 drivers/video/mpc8xx_lcd.c
 create mode 100644 drivers/video/pxa_lcd.c

-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 01/10] lcd, amba: remove this frame buffer driver since it is not used

2013-01-12 Thread Jeroen Hofstee
Since CONFIG_VIDEO_AMBA is not set by any board, it does not seem
to be used, so remove it since there is no way to (compile) test it.

cc: Alessandro Rubini 
cc: Anatolij Gustschin 
Signed-off-by: Jeroen Hofstee 
---
 drivers/video/Makefile |1 -
 drivers/video/amba.c   |   77 
 2 files changed, 78 deletions(-)
 delete mode 100644 drivers/video/amba.c

diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 170a358..8ff3958 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -39,7 +39,6 @@ COBJS-$(CONFIG_S6E8AX0) += s6e8ax0.o
 COBJS-$(CONFIG_S6E63D6) += s6e63d6.o
 COBJS-$(CONFIG_LD9040) += ld9040.o
 COBJS-$(CONFIG_SED156X) += sed156x.o
-COBJS-$(CONFIG_VIDEO_AMBA) += amba.o
 COBJS-$(CONFIG_VIDEO_COREBOOT) += coreboot_fb.o
 COBJS-$(CONFIG_VIDEO_CT69000) += ct69000.o videomodes.o
 COBJS-$(CONFIG_VIDEO_DA8XX) += da8xx-fb.o videomodes.o
diff --git a/drivers/video/amba.c b/drivers/video/amba.c
deleted file mode 100644
index b4fb47d..000
--- a/drivers/video/amba.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Driver for AMBA PrimeCell CLCD
- *
- * Copyright (C) 2009 Alessandro Rubini
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include 
-#include 
-#include 
-#include 
-
-/* These variables are required by lcd.c -- although it sets them by itself */
-int lcd_line_length;
-void *lcd_base;
-void *lcd_console_address;
-short console_col;
-short console_row;
-
-/*
- * To use this driver you need to provide the following in board files:
- * a panel_info definition
- * an lcd_enable function (can't define a weak default with current code)
- */
-
-/* There is nothing to do with color registers, we use true color */
-void lcd_setcolreg(ushort regno, ushort red, ushort green, ushort blue)
-{
-   return;
-}
-
-/* Low level initialization of the logic cell: depends on panel_info */
-void lcd_ctrl_init(void *lcdbase)
-{
-   struct clcd_config *config;
-   struct clcd_registers *regs;
-   u32 cntl;
-
-   config = panel_info.priv;
-   regs = config->address;
-   cntl = config->cntl & ~CNTL_LCDEN;
-
-   /* Lazily, just copy the registers over: first control with disable */
-   writel(cntl, ®s->cntl);
-
-   writel(config->tim0, ®s->tim0);
-   writel(config->tim1, ®s->tim1);
-   writel(config->tim2, ®s->tim2);
-   writel(config->tim3, ®s->tim3);
-   writel((u32)lcdbase, ®s->ubas);
-   /* finally, enable */
-   writel(cntl | CNTL_LCDEN, ®s->cntl);
-}
-
-/* This is trivial, and copied from atmel_lcdfb.c */
-ulong calc_fbsize(void)
-{
-   return ((panel_info.vl_col * panel_info.vl_row *
-   NBITS(panel_info.vl_bpix)) / 8) + PAGE_SIZE;
-}
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/3] h2200: Add board reset support

2013-01-12 Thread Lukasz Dalek
Use Samsung S3CA410X01 companion chip to reset PDA.

Signed-off-by: Lukasz Dalek 
---
 board/h2200/h2200.c |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/board/h2200/h2200.c b/board/h2200/h2200.c
index 720b06e..a716a3f 100644
--- a/board/h2200/h2200.c
+++ b/board/h2200/h2200.c
@@ -32,6 +32,15 @@ int board_eth_init(bd_t *bis)
return 0;
 }
 
+void board_reset(void)
+{
+   /* Enable VLIO interface on Hamcop */
+   writeb(0x1, 0x4000);
+
+   /* Reset board (cold reset) */
+   writeb(0xff, 0x4002);
+}
+
 int board_init(void)
 {
/* We have RAM, disable cache */
-- 
1.7.8.6

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 02/10] lcd, tegra: remove unused cursor functions

2013-01-12 Thread Jeroen Hofstee
cc: Anatolij Gustschin 
cc: Simon Glass 
Signed-off-by: Jeroen Hofstee 
---
 drivers/video/tegra.c |   52 -
 1 file changed, 52 deletions(-)

diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c
index 3709d0b..26a96a5 100644
--- a/drivers/video/tegra.c
+++ b/drivers/video/tegra.c
@@ -73,62 +73,10 @@ vidinfo_t panel_info = {
.vl_col = -1,
 };
 
-char lcd_cursor_enabled;
-
-ushort lcd_cursor_width;
-ushort lcd_cursor_height;
-
 #ifndef CONFIG_OF_CONTROL
 #error "You must enable CONFIG_OF_CONTROL to get Tegra LCD support"
 #endif
 
-void lcd_cursor_size(ushort width, ushort height)
-{
-   lcd_cursor_width = width;
-   lcd_cursor_height = height;
-}
-
-void lcd_toggle_cursor(void)
-{
-   ushort x, y;
-   uchar *dest;
-   ushort row;
-
-   x = console_col * lcd_cursor_width;
-   y = console_row * lcd_cursor_height;
-   dest = (uchar *)(lcd_base + y * lcd_line_length + x * (1 << LCD_BPP) /
-   8);
-
-   for (row = 0; row < lcd_cursor_height; ++row, dest += lcd_line_length) {
-   ushort *d = (ushort *)dest;
-   ushort color;
-   int i;
-
-   for (i = 0; i < lcd_cursor_width; ++i) {
-   color = *d;
-   color ^= lcd_getfgcolor();
-   *d = color;
-   ++d;
-   }
-   }
-}
-
-void lcd_cursor_on(void)
-{
-   lcd_cursor_enabled = 1;
-   lcd_toggle_cursor();
-}
-void lcd_cursor_off(void)
-{
-   lcd_cursor_enabled = 0;
-   lcd_toggle_cursor();
-}
-
-char lcd_is_cursor_enabled(void)
-{
-   return lcd_cursor_enabled;
-}
-
 static void update_panel_size(struct fdt_disp_config *config)
 {
panel_info.vl_col = config->width;
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 03/10] lcd, mpc8xx: move the mpc8xx frame buffer driver to drivers/video

2013-01-12 Thread Jeroen Hofstee
Since the lcd code was compiled unconditionally in arch also
add CONFIG_MPC8XX_LCD to the boards using this driver.

cc: Anatolij Gustschin 
cc: John Zhan 
cc: Wolfgang Denk 
Signed-off-by: Jeroen Hofstee 
---
 arch/powerpc/cpu/mpc8xx/Makefile |1 -
 arch/powerpc/cpu/mpc8xx/lcd.c|  618 --
 drivers/video/Makefile   |1 +
 drivers/video/mpc8xx_lcd.c   |  618 ++
 include/configs/R360MPI.h|1 +
 include/configs/RBC823.h |1 +
 include/configs/RPXlite_DW.h |1 +
 include/configs/RRvision.h   |4 +-
 include/configs/TQM823L.h|1 +
 include/configs/TQM823M.h|1 +
 include/configs/lwmon.h  |1 +
 include/configs/svm_sc8xx.h  |1 +
 include/configs/v37.h|1 +
 13 files changed, 630 insertions(+), 620 deletions(-)
 delete mode 100644 arch/powerpc/cpu/mpc8xx/lcd.c
 create mode 100644 drivers/video/mpc8xx_lcd.c

diff --git a/arch/powerpc/cpu/mpc8xx/Makefile b/arch/powerpc/cpu/mpc8xx/Makefile
index 0d1a12c..ef10e2d 100644
--- a/arch/powerpc/cpu/mpc8xx/Makefile
+++ b/arch/powerpc/cpu/mpc8xx/Makefile
@@ -37,7 +37,6 @@ COBJS-y   += fec.o
 COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
 COBJS-y+= i2c.o
 COBJS-y+= interrupts.o
-COBJS-y+= lcd.o
 COBJS-y+= scc.o
 COBJS-y+= serial.o
 COBJS-y+= speed.o
diff --git a/arch/powerpc/cpu/mpc8xx/lcd.c b/arch/powerpc/cpu/mpc8xx/lcd.c
deleted file mode 100644
index 4fd44ac..000
--- a/arch/powerpc/cpu/mpc8xx/lcd.c
+++ /dev/null
@@ -1,618 +0,0 @@
-/*
- * (C) Copyright 2001-2002
- * Wolfgang Denk, DENX Software Engineering -- w...@denx.de
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-//
-/* ** HEADER FILES */
-//
-
-/* #define DEBUG */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#if defined(CONFIG_POST)
-#include 
-#endif
-#include 
-
-#ifdef CONFIG_LCD
-
-//
-/* ** CONFIG STUFF -- should be moved to board config file */
-//
-#ifndef CONFIG_LCD_INFO
-#define CONFIG_LCD_INFO/* Display Logo, (C) and system info
*/
-#endif
-
-#if defined(CONFIG_V37) || defined(CONFIG_EDT32F10)
-#undef CONFIG_LCD_LOGO
-#undef CONFIG_LCD_INFO
-#endif
-
-/*--*/
-#ifdef CONFIG_KYOCERA_KCS057QV1AJ
-/*
- *  Kyocera KCS057QV1AJ-G23. Passive, color, single scan.
- */
-#define LCD_BPPLCD_COLOR4
-
-vidinfo_t panel_info = {
-640, 480, 132, 99, CONFIG_SYS_HIGH, CONFIG_SYS_HIGH, CONFIG_SYS_HIGH, 
CONFIG_SYS_HIGH, CONFIG_SYS_HIGH,
-LCD_BPP, 1, 0, 1, 0,  5, 0, 0, 0
-   /* wbl, vpw, lcdac, wbf */
-};
-#endif /* CONFIG_KYOCERA_KCS057QV1AJ */
-/*--*/
-
-/*--*/
-#ifdef CONFIG_HITACHI_SP19X001_Z1A
-/*
- *  Hitachi SP19X001-. Active, color, single scan.
- */
-vidinfo_t panel_info = {
-640, 480, 154, 116, CONFIG_SYS_HIGH, CONFIG_SYS_HIGH, CONFIG_SYS_HIGH, 
CONFIG_SYS_HIGH, CONFIG_SYS_HIGH,
-LCD_COLOR8, 1, 0, 1, 0, 0, 0, 0, 0
-   /* wbl, vpw, lcdac, wbf */
-};
-#endif /* CONFIG_HITACHI_SP19X001_Z1A */
-/*--*/
-
-/*--*/
-#ifdef CONFIG_NEC_NL6448AC33
-/*
- *  NEC NL6448AC33-18. Active, color, single scan.
- */
-vidinfo_t panel_info = {
-640, 480, 132, 99, CONFIG_SYS_HIGH, CONFIG_SYS_HIGH, CONFIG_SYS_LOW, 
CONFIG_SYS_LOW, CONFIG_SYS_HIGH,
-3, 0, 0, 1, 1, 144, 2, 0, 33
-   /* wbl, vpw, lcdac, wbf */
-};
-#endif /* CONFIG_NEC_NL6448AC33 */
-/*--*/
-
-#ifdef

[U-Boot] [PATCH 06/10] common/lcd.c: remove global lcd_base

2013-01-12 Thread Jeroen Hofstee
lcd_base is available as gd->fb_base as well, there is no need
to keep a seperate copy.

Cc: Alessandro Rubini 
Cc: Anatolij Gustschin 
Cc: Bo Shen 
Cc: Haavard Skinnemoen 
Cc: Kyungmin Park 
Cc: Marek Vasut 
Cc: Minkyu Kang 
Cc: Nikita Kiryanov 
Cc: Simon Glass 
Cc: Stelian Pop 
Cc: Tom Warren 
Signed-off-by: Jeroen Hofstee 
---
 board/mcc200/lcd.c   |8 ++--
 common/lcd.c |1 +
 drivers/video/atmel_hlcdfb.c |2 --
 drivers/video/atmel_lcdfb.c  |2 --
 drivers/video/exynos_fb.c|8 +++-
 drivers/video/mpc8xx_lcd.c   |   12 ++--
 drivers/video/pxa_lcd.c  |2 --
 drivers/video/tegra.c|6 +-
 include/lcd.h|5 -
 9 files changed, 9 insertions(+), 37 deletions(-)

diff --git a/board/mcc200/lcd.c b/board/mcc200/lcd.c
index caf8d8b..feded49 100644
--- a/board/mcc200/lcd.c
+++ b/board/mcc200/lcd.c
@@ -68,10 +68,6 @@ vidinfo_t panel_info = {
LCD_WIDTH, LCD_HEIGHT, LCD_BPP
 };
 
-/*
- * Frame buffer memory information
- */
-void *lcd_base;/* Start of framebuffer memory  */
 
 /*
  *  The device we use to communicate with PSoC
@@ -147,12 +143,12 @@ void lcd_enable (void)
 
 #if !defined(SWAPPED_LCD)
for (i=0; ifb_base)[i]);
}
 #else
 {
int x, y, pwidth;
-   char *p = (char *)lcd_base;
+   char *p = (char *)gd->fb_base;
 
pwidth = ((panel_info.vl_col+7) >> 3);
for (y=0; y
 #include 
 
-void *lcd_base;/* Start of framebuffer memory  
*/
-
 /* configurable parameters */
 #define ATMEL_LCDC_CVAL_DEFAULT0xc8
 #define ATMEL_LCDC_DMA_BURST_LEN   8
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 370d9ca..2afeab2 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -29,8 +29,6 @@
 #include 
 #include 
 
-void *lcd_base;/* Start of framebuffer memory  
*/
-
 /* configurable parameters */
 #define ATMEL_LCDC_CVAL_DEFAULT0xc8
 #define ATMEL_LCDC_DMA_BURST_LEN   8
diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
index 3e5f868..6f3c85d 100644
--- a/drivers/video/exynos_fb.c
+++ b/drivers/video/exynos_fb.c
@@ -33,7 +33,7 @@
 
 #include "exynos_fb.h"
 
-void *lcd_base;
+DECLARE_GLOBAL_DATA_PTR;
 
 static unsigned int panel_width, panel_height;
 
@@ -44,11 +44,9 @@ static void exynos_lcd_init_mem(void *lcdbase, vidinfo_t 
*vid)
 
fb_size = vid->vl_row * vid->vl_col * (NBITS(vid->vl_bpix) >> 3);
 
-   lcd_base = lcdbase;
-
palette_size = NBITS(vid->vl_bpix) == 8 ? 256 : 16;
 
-   exynos_fimd_lcd_init_mem((unsigned long)lcd_base,
+   exynos_fimd_lcd_init_mem((unsigned long)lcdbase,
(unsigned long)fb_size, palette_size);
 }
 
@@ -135,7 +133,7 @@ void lcd_ctrl_init(void *lcdbase)
 void lcd_enable(void)
 {
if (panel_info.logo_on) {
-   memset(lcd_base, 0, panel_width * panel_height *
+   memset((void *) gd->fb_base, 0, panel_width * panel_height *
(NBITS(panel_info.vl_bpix) >> 3));
draw_logo();
}
diff --git a/drivers/video/mpc8xx_lcd.c b/drivers/video/mpc8xx_lcd.c
index 26ad432..1aa1967 100644
--- a/drivers/video/mpc8xx_lcd.c
+++ b/drivers/video/mpc8xx_lcd.c
@@ -255,14 +255,6 @@ vidinfo_t panel_info = {
 #endif
 /*--*/
 
-
-/*
- * Frame buffer memory information
- */
-void *lcd_base;/* Start of framebuffer memory  */
-
-//
-
 void lcd_ctrl_init (void *lcdbase);
 void lcd_enable (void);
 #if LCD_BPP == LCD_COLOR8
@@ -392,8 +384,8 @@ void lcd_ctrl_init (void *lcdbase)
 * BIG NOTE:  This has to be modified to load A and B depending
 * upon the split mode of the LCD.
 */
-   lcdp->lcd_lcfaa = (ulong)lcd_base;
-   lcdp->lcd_lcfba = (ulong)lcd_base;
+   lcdp->lcd_lcfaa = (ulong)lcdbase;
+   lcdp->lcd_lcfba = (ulong)lcdbase;
 
/* MORE HACKS...This must be updated according to 823 manual
 * for different panels.
diff --git a/drivers/video/pxa_lcd.c b/drivers/video/pxa_lcd.c
index 57243ce..fef49c1 100644
--- a/drivers/video/pxa_lcd.c
+++ b/drivers/video/pxa_lcd.c
@@ -332,8 +332,6 @@ void lcd_getcolreg (ushort regno, ushort *red, ushort 
*green, ushort *blue);
 void lcd_ctrl_init (void *lcdbase);
 void lcd_enable(void);
 
-void *lcd_base;/* Start of framebuffer memory  */
-
 static int pxafb_init_mem (void *lcdbase, vidinfo_t *vid);
 static void pxafb_setup_gpio (vidinfo_t *vid);
 static void pxafb_enable_controller (vidinfo_t *vid);
diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c
index 0d1cfa9..941551c 100644
--- a/drivers/video/tegra.c
+++ b/drivers/video/tegra.c
@@ -60,8 +60,6 @@ enum {
  

[U-Boot] [PATCH 05/10] common/lcd.c: cleanup use of global variables

2013-01-12 Thread Jeroen Hofstee
console_col, console_row, lcd_line_length, lcd_console_address had
to be declared in board / driver specific code, but were not actually
used there. Get rid of the global variables.

Cc: Alessandro Rubini 
Cc: Anatolij Gustschin 
Cc: Bo Shen 
Cc: Haavard Skinnemoen 
Cc: Kyungmin Park 
Cc: Marek Vasut 
Cc: Minkyu Kang 
Cc: Nikita Kiryanov 
Cc: Simon Glass 
Cc: Stelian Pop 
Cc: Tom Warren 
Signed-off-by: Jeroen Hofstee 
---
 board/mcc200/lcd.c   |6 --
 common/lcd.c |6 ++
 drivers/video/atmel_hlcdfb.c |6 --
 drivers/video/atmel_lcdfb.c  |6 --
 drivers/video/exynos_fb.c|6 --
 drivers/video/mpc8xx_lcd.c   |6 --
 drivers/video/pxa_lcd.c  |6 --
 drivers/video/tegra.c|6 --
 include/lcd.h|5 -
 9 files changed, 6 insertions(+), 47 deletions(-)

diff --git a/board/mcc200/lcd.c b/board/mcc200/lcd.c
index 0f3f585..caf8d8b 100644
--- a/board/mcc200/lcd.c
+++ b/board/mcc200/lcd.c
@@ -68,16 +68,10 @@ vidinfo_t panel_info = {
LCD_WIDTH, LCD_HEIGHT, LCD_BPP
 };
 
-int lcd_line_length;
-
 /*
  * Frame buffer memory information
  */
 void *lcd_base;/* Start of framebuffer memory  */
-void *lcd_console_address; /* Start of console buffer  */
-
-short console_col = 0;
-short console_row = 0;
 
 /*
  *  The device we use to communicate with PSoC
diff --git a/common/lcd.c b/common/lcd.c
index b67724e..d3fd68d 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -99,9 +99,15 @@ static void lcd_setbgcolor(int color);
 
 static int lcd_color_fg;
 static int lcd_color_bg;
+static int lcd_line_length;
 
 char lcd_is_enabled = 0;
 
+static short console_col;
+static short console_row;
+
+static void *lcd_console_address;
+
 static char lcd_flush_dcache;  /* 1 to flush dcache after each lcd update */
 
 
diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c
index e74eb65..32626cf 100644
--- a/drivers/video/atmel_hlcdfb.c
+++ b/drivers/video/atmel_hlcdfb.c
@@ -29,13 +29,7 @@
 #include 
 #include 
 
-int lcd_line_length;
-
 void *lcd_base;/* Start of framebuffer memory  
*/
-void *lcd_console_address; /* Start of console buffer  */
-
-short console_col;
-short console_row;
 
 /* configurable parameters */
 #define ATMEL_LCDC_CVAL_DEFAULT0xc8
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index d96f175..370d9ca 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -29,13 +29,7 @@
 #include 
 #include 
 
-int lcd_line_length;
-
 void *lcd_base;/* Start of framebuffer memory  
*/
-void *lcd_console_address; /* Start of console buffer  */
-
-short console_col;
-short console_row;
 
 /* configurable parameters */
 #define ATMEL_LCDC_CVAL_DEFAULT0xc8
diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
index 3dd6100..3e5f868 100644
--- a/drivers/video/exynos_fb.c
+++ b/drivers/video/exynos_fb.c
@@ -33,13 +33,7 @@
 
 #include "exynos_fb.h"
 
-int lcd_line_length;
-
 void *lcd_base;
-void *lcd_console_address;
-
-short console_col;
-short console_row;
 
 static unsigned int panel_width, panel_height;
 
diff --git a/drivers/video/mpc8xx_lcd.c b/drivers/video/mpc8xx_lcd.c
index 4fd44ac..26ad432 100644
--- a/drivers/video/mpc8xx_lcd.c
+++ b/drivers/video/mpc8xx_lcd.c
@@ -256,16 +256,10 @@ vidinfo_t panel_info = {
 /*--*/
 
 
-int lcd_line_length;
-
 /*
  * Frame buffer memory information
  */
 void *lcd_base;/* Start of framebuffer memory  */
-void *lcd_console_address; /* Start of console buffer  */
-
-short console_col;
-short console_row;
 
 //
 
diff --git a/drivers/video/pxa_lcd.c b/drivers/video/pxa_lcd.c
index 25747b1..57243ce 100644
--- a/drivers/video/pxa_lcd.c
+++ b/drivers/video/pxa_lcd.c
@@ -332,13 +332,7 @@ void lcd_getcolreg (ushort regno, ushort *red, ushort 
*green, ushort *blue);
 void lcd_ctrl_init (void *lcdbase);
 void lcd_enable(void);
 
-int lcd_line_length;
-
 void *lcd_base;/* Start of framebuffer memory  */
-void *lcd_console_address; /* Start of console buffer  */
-
-short console_col;
-short console_row;
 
 static int pxafb_init_mem (void *lcdbase, vidinfo_t *vid);
 static void pxafb_setup_gpio (vidinfo_t *vid);
diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c
index 26a96a5..0d1cfa9 100644
--- a/drivers/video/tegra.c
+++ b/drivers/video/tegra.c
@@ -60,13 +60,7 @@ enum {
LCD_MAX_LOG2_BPP= 4,/* 2^4 = 16 bpp */
 };
 
-int lcd_line_length;
-
 void *lcd_base;/* Start of framebuffer memory  */
-void *lcd_console_address; /* Start of console buffer  */
-
-short console_col;
-s

[U-Boot] [PATCH 07/10] common/lcd: cosmetic: clean up a bit

2013-01-12 Thread Jeroen Hofstee
 - Make the brackets of the function calls more consistent
 - Remove really unnecessary brackets
 - Removes the extern from the function definitions
 - Remove curly brackets from single line statements
 - Remove lcd_setmem proto since it is already in common.h
 - Don't init globals to 0

cc: Anatolij Gustschin 
Signed-off-by: Jeroen Hofstee 
---
 common/lcd.c  |   84 ++---
 include/lcd.h |   35 +++-
 2 files changed, 48 insertions(+), 71 deletions(-)

diff --git a/common/lcd.c b/common/lcd.c
index 02f4721..b21ce7f 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -83,15 +83,13 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-ulong lcd_setmem (ulong addr);
-
 static void lcd_drawchars(ushort x, ushort y, uchar *str, int count);
 static inline void lcd_puts_xy(ushort x, ushort y, uchar *s);
 static inline void lcd_putc_xy(ushort x, ushort y, uchar  c);
 
 static int lcd_init(void *lcdbase);
 
-static void *lcd_logo (void);
+static void *lcd_logo(void);
 
 static int lcd_getbgcolor(void);
 static void lcd_setfgcolor(int color);
@@ -111,13 +109,6 @@ static void *lcd_base; /* Start of 
framebuffer memory  */
 
 static char lcd_flush_dcache;  /* 1 to flush dcache after each lcd update */
 
-
-#ifdef NOT_USED_SO_FAR
-static void lcd_getcolreg(ushort regno,
-   ushort *red, ushort *green, ushort *blue);
-static int lcd_getfgcolor(void);
-#endif /* NOT_USED_SO_FAR */
-
 //
 
 /* Flush LCD activity to the caches */
@@ -156,7 +147,7 @@ static void console_scrollup(void)
/* Clear the last rows */
memset(lcd_console_address + CONSOLE_SIZE - CONSOLE_ROW_SIZE * rows,
COLOR_MASK(lcd_color_bg),
-  CONSOLE_ROW_SIZE * rows);
+   CONSOLE_ROW_SIZE * rows);
 
lcd_sync();
console_row -= rows;
@@ -168,9 +159,8 @@ static inline void console_back(void)
 {
if (--console_col < 0) {
console_col = CONSOLE_COLS-1 ;
-   if (--console_row < 0) {
+   if (--console_row < 0)
console_row = 0;
-   }
}
 
lcd_putc_xy(console_col * VIDEO_FONT_WIDTH,
@@ -181,16 +171,13 @@ static inline void console_back(void)
 
 static inline void console_newline(void)
 {
-   ++console_row;
console_col = 0;
 
/* Check if we need to scroll the terminal */
-   if (console_row >= CONSOLE_ROWS) {
-   /* Scroll everything up */
+   if (++console_row >= CONSOLE_ROWS)
console_scrollup();
-   } else {
+   else
lcd_sync();
-   }
 }
 
 /*--*/
@@ -242,9 +229,9 @@ void lcd_puts(const char *s)
return;
}
 
-   while (*s) {
+   while (*s)
lcd_putc(*s++);
-   }
+
lcd_sync();
 }
 
@@ -291,7 +278,7 @@ static void lcd_drawchars(ushort x, ushort y, uchar *str, 
int count)
 #endif
 
 #if LCD_BPP == LCD_MONOCHROME
-   uchar rest = *d & -(1 << (8-off));
+   uchar rest = *d & -(1 << (8 - off));
uchar sym;
 #endif
for (i = 0; i < count; ++i) {
@@ -321,7 +308,7 @@ static void lcd_drawchars(ushort x, ushort y, uchar *str, 
int count)
 #endif
}
 #if LCD_BPP == LCD_MONOCHROME
-   *d  = rest | (*d & ((1 << (8-off)) - 1));
+   *d  = rest | (*d & ((1 << (8 - off)) - 1));
 #endif
}
 }
@@ -348,7 +335,7 @@ static inline void lcd_putc_xy(ushort x, ushort y, uchar c)
 #defineN_BLK_VERT  2
 #defineN_BLK_HOR   3
 
-static int test_colors[N_BLK_HOR*N_BLK_VERT] = {
+static int test_colors[N_BLK_HOR * N_BLK_VERT] = {
CONSOLE_COLOR_RED,  CONSOLE_COLOR_GREEN,CONSOLE_COLOR_YELLOW,
CONSOLE_COLOR_BLUE, CONSOLE_COLOR_MAGENTA,  CONSOLE_COLOR_CYAN,
 };
@@ -369,7 +356,7 @@ static void test_pattern(void)
for (v = 0; v < v_max; ++v) {
uchar iy = v / v_step;
for (h = 0; h < h_max; ++h) {
-   uchar ix = N_BLK_HOR * iy + (h/h_step);
+   uchar ix = N_BLK_HOR * iy + h / h_step;
*pix++ = test_colors[ix];
}
}
@@ -387,12 +374,12 @@ int lcd_get_size(int *line_length)
return *line_length * panel_info.vl_row;
 }
 
-int drv_lcd_init (void)
+int drv_lcd_init(void)
 {
struct stdio_dev lcddev;
int rc;
 
-   lcd_base = (void *)(gd->fb_base);
+   lcd_base = (void *) gd->fb_base;
 
lcd_get_size(&lcd_line_length);
 
@@ -407,7 +394,7 @@ int drv_lcd_init (void)
lcddev.putc  = lcd_putc;/* 'putc' function */
lcddev.puts  = lcd_puts;/* 'puts' function */
 
-   rc = stdio_register (&lcddev);
+   rc = stdio_register(&lcd

[U-Boot] [PATCH 08/10] lcd, fb: cleanup, remove prototypes already in lcd.h and unused code

2013-01-12 Thread Jeroen Hofstee
cc: Anatolij Gustschin 
cc: Cliff Brake 
cc: John Zhan 
cc: Marek Vasut 
cc: Wolfgang Denk 
Signed-off-by: Jeroen Hofstee 
---
 board/mcc200/lcd.c |7 ---
 drivers/video/mpc8xx_lcd.c |   40 
 drivers/video/pxa_lcd.c|   33 -
 3 files changed, 80 deletions(-)

diff --git a/board/mcc200/lcd.c b/board/mcc200/lcd.c
index feded49..9d9ce2b 100644
--- a/board/mcc200/lcd.c
+++ b/board/mcc200/lcd.c
@@ -75,13 +75,6 @@ vidinfo_t panel_info = {
 int serial_inited = 0;
 
 /*
- * Exported functions
- */
-void lcd_initcolregs (void);
-void lcd_ctrl_init (void *lcdbase);
-void lcd_enable (void);
-
-/*
  *  Imported functions to support the PSoC protocol
  */
 extern int serial_init_dev (unsigned long dev_base);
diff --git a/drivers/video/mpc8xx_lcd.c b/drivers/video/mpc8xx_lcd.c
index 1aa1967..f0f728e 100644
--- a/drivers/video/mpc8xx_lcd.c
+++ b/drivers/video/mpc8xx_lcd.c
@@ -253,23 +253,6 @@ vidinfo_t panel_info = {
 LCD_BPP,  0, 0, 0, 0, 33, 0, 0, 0
 };
 #endif
-/*--*/
-
-void lcd_ctrl_init (void *lcdbase);
-void lcd_enable (void);
-#if LCD_BPP == LCD_COLOR8
-void lcd_setcolreg (ushort regno,
-   ushort red, ushort green, ushort blue);
-#endif
-#if LCD_BPP == LCD_MONOCHROME
-void lcd_initcolregs (void);
-#endif
-
-#if defined(CONFIG_RBC823)
-void lcd_disable (void);
-#endif
-
-//
 
 //
 /* - chipset specific functions --- */
@@ -415,29 +398,6 @@ void lcd_ctrl_init (void *lcdbase)
 
 /*--*/
 
-#ifdef NOT_USED_SO_FAR
-static void
-lcd_getcolreg (ushort regno, ushort *red, ushort *green, ushort *blue)
-{
-   volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
-   volatile cpm8xx_t *cp = &(immr->im_cpm);
-   unsigned short colreg, *cmap_ptr;
-
-   cmap_ptr = (unsigned short *)&cp->lcd_cmap[regno * 2];
-
-   colreg = *cmap_ptr;
-#ifdef CONFIG_SYS_INVERT_COLORS
-   colreg ^= 0x0FFF;
-#endif
-
-   *red   = (colreg >> 8) & 0x0F;
-   *green = (colreg >> 4) & 0x0F;
-   *blue  =  colreg   & 0x0F;
-}
-#endif /* NOT_USED_SO_FAR */
-
-/*--*/
-
 #if LCD_BPP == LCD_COLOR8
 void
 lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue)
diff --git a/drivers/video/pxa_lcd.c b/drivers/video/pxa_lcd.c
index fef49c1..b40ec36 100644
--- a/drivers/video/pxa_lcd.c
+++ b/drivers/video/pxa_lcd.c
@@ -317,26 +317,10 @@ vidinfo_t panel_info = {
 
 /*--*/
 
-#if LCD_BPP == LCD_COLOR8
-void lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue);
-#endif
-#if LCD_BPP == LCD_MONOCHROME
-void lcd_initcolregs (void);
-#endif
-
-#ifdef NOT_USED_SO_FAR
-void lcd_disable (void);
-void lcd_getcolreg (ushort regno, ushort *red, ushort *green, ushort *blue);
-#endif /* NOT_USED_SO_FAR */
-
-void lcd_ctrl_init (void *lcdbase);
-void lcd_enable(void);
-
 static int pxafb_init_mem (void *lcdbase, vidinfo_t *vid);
 static void pxafb_setup_gpio (vidinfo_t *vid);
 static void pxafb_enable_controller (vidinfo_t *vid);
 static int pxafb_init (vidinfo_t *vid);
-//
 
 //
 /* ---  PXA chipset specific functions  --- */
@@ -351,14 +335,6 @@ void lcd_ctrl_init (void *lcdbase)
 }
 
 /*--*/
-#ifdef NOT_USED_SO_FAR
-void
-lcd_getcolreg (ushort regno, ushort *red, ushort *green, ushort *blue)
-{
-}
-#endif /* NOT_USED_SO_FAR */
-
-/*--*/
 #if LCD_BPP == LCD_COLOR8
 void
 lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue)
@@ -406,15 +382,6 @@ void lcd_enable (void)
 {
 }
 
-/*--*/
-#ifdef NOT_USED_SO_FAR
-static void lcd_disable (void)
-{
-}
-#endif /* NOT_USED_SO_FAR */
-
-/*--*/
-
 //
 /* ** PXA255 specific routines */
 //
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 04/10] lcd, pxafb: move the pxafb to drivers/video

2013-01-12 Thread Jeroen Hofstee
Since the lcd code was compiled unconditionally for pxa also add
CONFIG_PXA_LCD to the boards using this framebuffer. Since the
driver/video contains video and lcd driver add lcd to the name
to make clear it belongs to common/lcd.c.

cc: Anatolij Gustschin 
cc: Cliff Brake 
cc: Marek Vasut 
Signed-off-by: Jeroen Hofstee 
---
 arch/arm/cpu/pxa/Makefile|1 -
 arch/arm/cpu/pxa/pxafb.c |  650 --
 drivers/video/Makefile   |1 +
 drivers/video/pxa_lcd.c  |  650 ++
 include/configs/lubbock.h|1 +
 include/configs/palmld.h |1 +
 include/configs/palmtc.h |1 +
 include/configs/pxa255_idp.h |1 +
 include/configs/zipitz2.h|1 +
 9 files changed, 656 insertions(+), 651 deletions(-)
 delete mode 100644 arch/arm/cpu/pxa/pxafb.c
 create mode 100644 drivers/video/pxa_lcd.c

diff --git a/arch/arm/cpu/pxa/Makefile b/arch/arm/cpu/pxa/Makefile
index e088832..9f63c34 100644
--- a/arch/arm/cpu/pxa/Makefile
+++ b/arch/arm/cpu/pxa/Makefile
@@ -33,7 +33,6 @@ COBJS-$(CONFIG_CPU_PXA27X)= pxa2xx.o
 COBJS-y+= cpuinfo.o
 
 COBJS  = $(COBJS-y)
-COBJS  += pxafb.o
 COBJS  += timer.o
 COBJS  += usb.o
 
diff --git a/arch/arm/cpu/pxa/pxafb.c b/arch/arm/cpu/pxa/pxafb.c
deleted file mode 100644
index 25747b1..000
--- a/arch/arm/cpu/pxa/pxafb.c
+++ /dev/null
@@ -1,650 +0,0 @@
-/*
- * PXA LCD Controller
- *
- * (C) Copyright 2001-2002
- * Wolfgang Denk, DENX Software Engineering -- w...@denx.de
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-//
-/* ** HEADER FILES */
-//
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-/* #define DEBUG */
-
-#ifdef CONFIG_LCD
-
-/*--*/
-/*
- * Define panel bpp, LCCR0, LCCR3 and panel_info video struct for
- * your display.
- */
-
-#ifdef CONFIG_PXA_VGA
-/* LCD outputs connected to a video DAC  */
-# define LCD_BPP   LCD_COLOR8
-
-/* you have to set lccr0 and lccr3 (including pcd) */
-# define REG_LCCR0 0x003008f8
-# define REG_LCCR3 0x0300FF01
-
-/* 640x480x16 @ 61 Hz */
-vidinfo_t panel_info = {
-   .vl_col = 640,
-   .vl_row = 480,
-   .vl_width   = 640,
-   .vl_height  = 480,
-   .vl_clkp= CONFIG_SYS_HIGH,
-   .vl_oep = CONFIG_SYS_HIGH,
-   .vl_hsp = CONFIG_SYS_HIGH,
-   .vl_vsp = CONFIG_SYS_HIGH,
-   .vl_dp  = CONFIG_SYS_HIGH,
-   .vl_bpix= LCD_BPP,
-   .vl_lbw = 0,
-   .vl_splt= 0,
-   .vl_clor= 0,
-   .vl_tft = 1,
-   .vl_hpw = 40,
-   .vl_blw = 56,
-   .vl_elw = 56,
-   .vl_vpw = 20,
-   .vl_bfw = 8,
-   .vl_efw = 8,
-};
-#endif /* CONFIG_PXA_VIDEO */
-
-/*--*/
-#ifdef CONFIG_SHARP_LM8V31
-
-# define LCD_BPP   LCD_COLOR8
-# define LCD_INVERT_COLORS /* Needed for colors to be correct, but why?
*/
-
-/* you have to set lccr0 and lccr3 (including pcd) */
-# define REG_LCCR0 0x0030087C
-# define REG_LCCR3 0x0340FF08
-
-vidinfo_t panel_info = {
-   .vl_col = 640,
-   .vl_row = 480,
-   .vl_width   = 157,
-   .vl_height  = 118,
-   .vl_clkp= CONFIG_SYS_HIGH,
-   .vl_oep = CONFIG_SYS_HIGH,
-   .vl_hsp = CONFIG_SYS_HIGH,
-   .vl_vsp = CONFIG_SYS_HIGH,
-   .vl_dp  = CONFIG_SYS_HIGH,
-   .vl_bpix= LCD_BPP,
-   .vl_lbw = 0,
-   .vl_splt= 1,
-   .vl_clor= 1,
-   .vl_tft = 0,
-   .vl_hpw = 1,
-   .vl_blw = 3,
-   .vl_elw = 3,
-   .vl_vpw = 1,
-   .vl_bfw = 0,
-   .vl_efw = 0,
-};
-#endif /* CONFIG_SHARP_LM8V31 */
-/*---

[U-Boot] [PATCH 09/10] api/api_display: use the getters for console size info

2013-01-12 Thread Jeroen Hofstee
cc: Che-Liang Chiou 
Signed-off-by: Jeroen Hofstee 
---
 api/api_display.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/api/api_display.c b/api/api_display.c
index 6439170..c167db7 100644
--- a/api/api_display.c
+++ b/api/api_display.c
@@ -45,8 +45,8 @@ int display_get_info(int type, struct display_info *di)
case DISPLAY_TYPE_LCD:
di->pixel_width  = panel_info.vl_col;
di->pixel_height = panel_info.vl_row;
-   di->screen_rows = CONSOLE_ROWS;
-   di->screen_cols = CONSOLE_COLS;
+   di->screen_rows = lcd_get_screen_rows();
+   di->screen_cols = lcd_get_screen_columns();
break;
 #endif
}
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 10/10] common/lcd.c: move the macro's to the c file

2013-01-12 Thread Jeroen Hofstee
Hide the console macros since some reference global data which is
no longer present.

cc: Anatolij Gustschin 
Signed-off-by: Jeroen Hofstee 
---
 common/lcd.c  |   28 
 include/lcd.h |   28 
 2 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/common/lcd.c b/common/lcd.c
index b21ce7f..1fc5e3b 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -81,6 +81,34 @@
 #define CONFIG_CONSOLE_SCROLL_LINES 1
 #endif
 
+//
+/* ** CONSOLE DEFINITIONS & FUNCTIONS  */
+//
+#if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO)
+# define CONSOLE_ROWS  ((panel_info.vl_row-BMP_LOGO_HEIGHT) \
+   / VIDEO_FONT_HEIGHT)
+#else
+# define CONSOLE_ROWS  (panel_info.vl_row / VIDEO_FONT_HEIGHT)
+#endif
+
+#define CONSOLE_COLS   (panel_info.vl_col / VIDEO_FONT_WIDTH)
+#define CONSOLE_ROW_SIZE   (VIDEO_FONT_HEIGHT * lcd_line_length)
+#define CONSOLE_ROW_FIRST  lcd_console_address
+#define CONSOLE_ROW_SECOND (lcd_console_address + CONSOLE_ROW_SIZE)
+#define CONSOLE_ROW_LAST   (lcd_console_address + CONSOLE_SIZE \
+   - CONSOLE_ROW_SIZE)
+#define CONSOLE_SIZE   (CONSOLE_ROW_SIZE * CONSOLE_ROWS)
+#define CONSOLE_SCROLL_SIZE(CONSOLE_SIZE - CONSOLE_ROW_SIZE)
+
+#if LCD_BPP == LCD_MONOCHROME
+# define COLOR_MASK(c) ((c)  | (c) << 1 | (c) << 2 | (c) << 3 | \
+(c) << 4 | (c) << 5 | (c) << 6 | (c) << 7)
+#elif (LCD_BPP == LCD_COLOR8) || (LCD_BPP == LCD_COLOR16)
+# define COLOR_MASK(c) (c)
+#else
+# error Unsupported LCD BPP.
+#endif
+
 DECLARE_GLOBAL_DATA_PTR;
 
 static void lcd_drawchars(ushort x, ushort y, uchar *str, int count);
diff --git a/include/lcd.h b/include/lcd.h
index c90a5c5..8ff60b7 100644
--- a/include/lcd.h
+++ b/include/lcd.h
@@ -419,33 +419,5 @@ int lcd_get_size(int *line_length);
 #endif
 
 //
-/* ** CONSOLE DEFINITIONS & FUNCTIONS  */
-//
-#if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO)
-# define CONSOLE_ROWS  ((panel_info.vl_row-BMP_LOGO_HEIGHT) \
-   / VIDEO_FONT_HEIGHT)
-#else
-# define CONSOLE_ROWS  (panel_info.vl_row / VIDEO_FONT_HEIGHT)
-#endif
-
-#define CONSOLE_COLS   (panel_info.vl_col / VIDEO_FONT_WIDTH)
-#define CONSOLE_ROW_SIZE   (VIDEO_FONT_HEIGHT * lcd_line_length)
-#define CONSOLE_ROW_FIRST  lcd_console_address
-#define CONSOLE_ROW_SECOND (lcd_console_address + CONSOLE_ROW_SIZE)
-#define CONSOLE_ROW_LAST   (lcd_console_address + CONSOLE_SIZE \
-   - CONSOLE_ROW_SIZE)
-#define CONSOLE_SIZE   (CONSOLE_ROW_SIZE * CONSOLE_ROWS)
-#define CONSOLE_SCROLL_SIZE(CONSOLE_SIZE - CONSOLE_ROW_SIZE)
-
-#if LCD_BPP == LCD_MONOCHROME
-# define COLOR_MASK(c) ((c)  | (c) << 1 | (c) << 2 | (c) << 3 | \
-(c) << 4 | (c) << 5 | (c) << 6 | (c) << 7)
-#elif (LCD_BPP == LCD_COLOR8) || (LCD_BPP == LCD_COLOR16)
-# define COLOR_MASK(c) (c)
-#else
-# error Unsupported LCD BPP.
-#endif
-
-//
 
 #endif /* _LCD_H_ */
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/3] pxa: Save lr register in relocate_code function

2013-01-12 Thread Lukasz Dalek
When u-boot is compiled for PXA25x processor, pxa/start.S is calling
cpu_init_crit by BL instruction. BL is overwriting lr register so
relocate_code is going into infinite loop. This patch preservs lr
register in r12 before calling cpu_init_crit and after function returns
restores it.

Signed-off-by: Lukasz Dalek 
---
 arch/arm/cpu/pxa/start.S |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/pxa/start.S b/arch/arm/cpu/pxa/start.S
index 72af869..e71803e 100644
--- a/arch/arm/cpu/pxa/start.S
+++ b/arch/arm/cpu/pxa/start.S
@@ -183,7 +183,9 @@ relocate_code:
 
 /* Disable the Dcache RAM lock for stack now */
 #ifdef CONFIG_CPU_PXA25X
+   mov r12, lr
bl  cpu_init_crit
+   mov lr, r12
 #endif
 
adr r0, _start
-- 
1.7.8.6

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 02/10] lcd, tegra: remove unused cursor functions

2013-01-12 Thread Jeroen Hofstee

I wrote down your mail address wrongly here. I will fix it in v2,
awaiting other comments.

On 01/12/2013 11:07 PM, Jeroen Hofstee wrote:

cc: Anatolij Gustschin 
cc: Simon Glass 
Signed-off-by: Jeroen Hofstee 
---
  drivers/video/tegra.c |   52 -
  1 file changed, 52 deletions(-)

diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c
index 3709d0b..26a96a5 100644
--- a/drivers/video/tegra.c
+++ b/drivers/video/tegra.c
@@ -73,62 +73,10 @@ vidinfo_t panel_info = {
.vl_col = -1,
  };
  
-char lcd_cursor_enabled;

-
-ushort lcd_cursor_width;
-ushort lcd_cursor_height;
-
  #ifndef CONFIG_OF_CONTROL
  #error "You must enable CONFIG_OF_CONTROL to get Tegra LCD support"
  #endif
  
-void lcd_cursor_size(ushort width, ushort height)

-{
-   lcd_cursor_width = width;
-   lcd_cursor_height = height;
-}
-
-void lcd_toggle_cursor(void)
-{
-   ushort x, y;
-   uchar *dest;
-   ushort row;
-
-   x = console_col * lcd_cursor_width;
-   y = console_row * lcd_cursor_height;
-   dest = (uchar *)(lcd_base + y * lcd_line_length + x * (1 << LCD_BPP) /
-   8);
-
-   for (row = 0; row < lcd_cursor_height; ++row, dest += lcd_line_length) {
-   ushort *d = (ushort *)dest;
-   ushort color;
-   int i;
-
-   for (i = 0; i < lcd_cursor_width; ++i) {
-   color = *d;
-   color ^= lcd_getfgcolor();
-   *d = color;
-   ++d;
-   }
-   }
-}
-
-void lcd_cursor_on(void)
-{
-   lcd_cursor_enabled = 1;
-   lcd_toggle_cursor();
-}
-void lcd_cursor_off(void)
-{
-   lcd_cursor_enabled = 0;
-   lcd_toggle_cursor();
-}
-
-char lcd_is_cursor_enabled(void)
-{
-   return lcd_cursor_enabled;
-}
-
  static void update_panel_size(struct fdt_disp_config *config)
  {
panel_info.vl_col = config->width;


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Running vanilla u-boot v2012.10 on Guruplug

2013-01-12 Thread Jason
On Sat, Jan 12, 2013 at 10:30:58PM +0100, Jeroen Hofstee wrote:
> On 01/12/2013 09:41 PM, Jason wrote:
> >On Sat, Jan 12, 2013 at 08:41:36PM +0100, Dirk Heinrichs wrote:
> >>Am Samstag 12 Januar 2013, 16:51:51 schrieb Wolfgang Denk:
> >>
> >>>Did you read the FAQ?  Especially
> >>>http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStarted
> >>>InRAM ?
> >>Now I did :) Thanx a lot.
> >>
> >>Interesting that [1] states it's possible, though...
> >With the dreamplug, I often load u-boot into RAM via the JTAG (0x060
> >and 0x080), and then 'resume 0x060'.  Then use the u-boot
> >running from 0x060 to burn the image to SPI flash from 0x080.
> >But that's loaded via the JTAG, not from a running u-boot.
> >
> >I think I posted instructions to this mailinglist a while ago about
> >this.  If you have the JTAG (it's only $35US), I would advise trying
> >that.
> >
> For what is worth, I can confirm above for the dreamplug..
> I wrote this down a once...:
> 
> cd /where/uboot_is
> sudo openocd -f /usr/share/openocd/scripts/board/sheevaplug.cfg
> 
> # other console
> telnet localhost 
> sheevaplug_init
> load_image u-boot
> load_image u-boot.kwb 0x080
> 
> resume 0x060
> # and hit stop in the serial terminal

Yep, this is exactly what I have.

> no Idea about the guruplug though..

It should work fine (unless you broke something, but that's the whole
point of this exercise, isn't it ;-) ).  If you get a u-boot command
prompt in your serial window after 'resume 0x060', then you just
successfully tested your u-boot.

hth,

Jason.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Running vanilla u-boot v2012.10 on Guruplug

2013-01-12 Thread Jason Cooper
On Sat, Jan 12, 2013 at 10:30:58PM +0100, Jeroen Hofstee wrote:
> On 01/12/2013 09:41 PM, Jason wrote:
> >On Sat, Jan 12, 2013 at 08:41:36PM +0100, Dirk Heinrichs wrote:
> >>Am Samstag 12 Januar 2013, 16:51:51 schrieb Wolfgang Denk:
> >>
> >>>Did you read the FAQ?  Especially
> >>>http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStarted
> >>>InRAM ?
> >>Now I did :) Thanx a lot.
> >>
> >>Interesting that [1] states it's possible, though...
> >With the dreamplug, I often load u-boot into RAM via the JTAG (0x060
> >and 0x080), and then 'resume 0x060'.  Then use the u-boot
> >running from 0x060 to burn the image to SPI flash from 0x080.
> >But that's loaded via the JTAG, not from a running u-boot.
> >
> >I think I posted instructions to this mailinglist a while ago about
> >this.  If you have the JTAG (it's only $35US), I would advise trying
> >that.
> >
> For what is worth, I can confirm above for the dreamplug..
> I wrote this down a once...:
> 
> cd /where/uboot_is
> sudo openocd -f /usr/share/openocd/scripts/board/sheevaplug.cfg
> 
> # other console
> telnet localhost 
> sheevaplug_init
> load_image u-boot
> load_image u-boot.kwb 0x080
> 
> resume 0x060
> # and hit stop in the serial terminal

Yep, this is exactly what I have.

> no Idea about the guruplug though..

It should work fine (unless you broke something, but that's the whole
point of this exercise, isn't it ;-) ).  If you get a u-boot command
prompt in your serial window after 'resume 0x060', then you just
successfully tested your u-boot.

hth,

Jason.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/3] pxa: Save lr register in relocate_code function

2013-01-12 Thread Marek Vasut
Dear Lukasz Dalek,

> When u-boot is compiled for PXA25x processor, pxa/start.S is calling
> cpu_init_crit by BL instruction. BL is overwriting lr register so
> relocate_code is going into infinite loop. This patch preservs lr
> register in r12 before calling cpu_init_crit and after function returns
> restores it.
> 
> Signed-off-by: Lukasz Dalek 

Acked-by: Marek Vasut 

Tom/Albert, can you please apply this for .01, seems critical to me ?

> ---
>  arch/arm/cpu/pxa/start.S |2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/cpu/pxa/start.S b/arch/arm/cpu/pxa/start.S
> index 72af869..e71803e 100644
> --- a/arch/arm/cpu/pxa/start.S
> +++ b/arch/arm/cpu/pxa/start.S
> @@ -183,7 +183,9 @@ relocate_code:
> 
>  /* Disable the Dcache RAM lock for stack now */
>  #ifdef   CONFIG_CPU_PXA25X
> + mov r12, lr
>   bl  cpu_init_crit
> + mov lr, r12
>  #endif
> 
>   adr r0, _start

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] h2200: Add board reset support

2013-01-12 Thread Marek Vasut
Dear Lukasz Dalek,

> Use Samsung S3CA410X01 companion chip to reset PDA.
> 
> Signed-off-by: Lukasz Dalek 
> ---
>  board/h2200/h2200.c |9 +
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/board/h2200/h2200.c b/board/h2200/h2200.c
> index 720b06e..a716a3f 100644
> --- a/board/h2200/h2200.c
> +++ b/board/h2200/h2200.c
> @@ -32,6 +32,15 @@ int board_eth_init(bd_t *bis)
>   return 0;
>  }
> 
> +void board_reset(void)
> +{
> + /* Enable VLIO interface on Hamcop */
> + writeb(0x1, 0x4000);
> +
> + /* Reset board (cold reset) */
> + writeb(0xff, 0x4002);
> +}

Can you not reimplement reset_cpu() ?

>  int board_init(void)
>  {
>   /* We have RAM, disable cache */

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 04/10] lcd, pxafb: move the pxafb to drivers/video

2013-01-12 Thread Marek Vasut
Dear Jeroen Hofstee,

> Since the lcd code was compiled unconditionally for pxa also add
> CONFIG_PXA_LCD to the boards using this framebuffer. Since the
> driver/video contains video and lcd driver add lcd to the name
> to make clear it belongs to common/lcd.c.
> 
> cc: Anatolij Gustschin 
> cc: Cliff Brake 
> cc: Marek Vasut 
> Signed-off-by: Jeroen Hofstee 

git format-patch -MC

Otherwise

Acked-by: Marek Vasut 

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] h2200: Add board reset support

2013-01-12 Thread Łukasz Dałek

On 13.01.2013 00:54, Marek Vasut wrote:

Dear Lukasz Dalek,


+void board_reset(void)
+{
+   /* Enable VLIO interface on Hamcop */
+   writeb(0x1, 0x4000);
+
+   /* Reset board (cold reset) */
+   writeb(0xff, 0x4002);
+}
Can you not reimplement reset_cpu() ?


reset_cpu() doesn't have __attribute__((weak)) so if I would try to 
implement it

compiler will return with error.

Yours sincerely,
Łukasz Dałek
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] h2200: Add board reset support

2013-01-12 Thread Marek Vasut
Dear Łukasz Dałek,

> On 13.01.2013 00:54, Marek Vasut wrote:
> > Dear Lukasz Dalek,
> > 
> > 
> > +void board_reset(void)
> > +{
> > +   /* Enable VLIO interface on Hamcop */
> > +   writeb(0x1, 0x4000);
> > +
> > +   /* Reset board (cold reset) */
> > +   writeb(0xff, 0x4002);
> > +}
> > Can you not reimplement reset_cpu() ?
> 
> reset_cpu() doesn't have __attribute__((weak)) so if I would try to
> implement it
> compiler will return with error.

Add it? Wasn't there similar patch already for some altera device?

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] h2200: Add board reset support

2013-01-12 Thread Lukasz Dalek
Use Samsung S3CA410X01 companion chip to reset PDA.

Signed-off-by: Lukasz Dalek 
---
Changes for v2:
- Reimplement reset_cpu() instead of board_reset()
---
 board/h2200/h2200.c |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/board/h2200/h2200.c b/board/h2200/h2200.c
index 720b06e..738e480 100644
--- a/board/h2200/h2200.c
+++ b/board/h2200/h2200.c
@@ -32,6 +32,15 @@ int board_eth_init(bd_t *bis)
return 0;
 }
 
+void reset_cpu(ulong ignore)
+{
+   /* Enable VLIO interface on Hamcop */
+   writeb(0x1, 0x4000);
+
+   /* Reset board (cold reset) */
+   writeb(0xff, 0x4002);
+}
+
 int board_init(void)
 {
/* We have RAM, disable cache */
-- 
1.7.8.6

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] pxa: Add weak attribute to reset_cpu() function

2013-01-12 Thread Lukasz Dalek
This commit allows pxa2xx based boards to reimplement reset_cpu()
function with board specific reset sequence.

Signed-off-by: Lukasz Dalek 
---
 arch/arm/cpu/pxa/pxa2xx.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c
index 09e8177..0c18610 100644
--- a/arch/arm/cpu/pxa/pxa2xx.c
+++ b/arch/arm/cpu/pxa/pxa2xx.c
@@ -284,7 +284,7 @@ void i2c_clk_enable(void)
writel(readl(CKEN) | CKEN14_I2C, CKEN);
 }
 
-void reset_cpu(ulong ignored) __attribute__((noreturn));
+void __attribute__((weak)) reset_cpu(ulong ignored) __attribute__((noreturn));
 
 void reset_cpu(ulong ignored)
 {
-- 
1.7.8.6

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Googlers please reply: commiters in U-Boot

2013-01-12 Thread Gabe Black
On Sat, Jan 12, 2013 at 9:20 AM, Simon Glass  wrote:

> Hi,
>
> You are being copied because you have written U-Boot code which is now
> in mainline.
>
> The chromium.org domain does not automatically attribute U-Boot
> commits by company. Each author needs to be manually added to the list
> and this can only be done if you confirm your employer.
>
> So, if you are on the CC list and work at Google, please reply-all
> with a quick email stating this (without top posting).
>
> Regards,
> Simon
>

I work for Google and CLs from gabebl...@chromium.org can be attributed to
Google.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Googlers please reply: commiters in U-Boot

2013-01-12 Thread 談偉航
On Sunday, January 13, 2013, Simon Glass wrote:

> Hi,
>
> You are being copied because you have written U-Boot code which is now
> in mainline.
>
> The chromium.org domain does not automatically attribute U-Boot
> commits by company. Each author needs to be manually added to the list
> and this can only be done if you confirm your employer.
>
> So, if you are on the CC list and work at Google, please reply-all
> with a quick email stating this (without top posting).
>
> Regards,
> Simon
>

I work for Google and CLs from
waih...@chromium.org
can
be attributed to Google.

Tom Wai-Hong Tam
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Googlers please reply: commiters in U-Boot

2013-01-12 Thread Bill Richardson
I work for Google. Anything that comes from wfric...@google.com or
wfric...@chromium.org comes from me.

Bill
-- 
Art for Art's Sake
Engineering for Money
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Running vanilla u-boot v2012.10 on Guruplug

2013-01-12 Thread Dirk Heinrichs
Am Samstag 12 Januar 2013, 15:41:54 schrieb Jason:

> > Interesting that [1] states it's possible, though...
> 
> With the dreamplug, I often load u-boot into RAM via the JTAG (0x060
> and 0x080), and then 'resume 0x060'.  Then use the u-boot
> running from 0x060 to burn the image to SPI flash from 0x080.
> But that's loaded via the JTAG, not from a running u-boot.

Yes, I do have a JTAG. And I have used openocd in the past to recover the 
plug, so I will try that method.

> I think I posted instructions to this mailinglist a while ago about
> this.  If you have the JTAG (it's only $35US), I would advise trying
> that.

Yes, I've seen that, too. However, I've also seen the instructions for doing 
it from within u-boot in the link I posted. Since they didn't work I thought 
it might be bug. Never thought that it wasn't supported and not supposed to 
work at all :)

Bye...

Dirk
-- 
Dirk Heinrichs 
Tel: +49 (0)2471 209385 | Mobil: +49 (0)176 34473913
GPG Public Key C2E467BB | Jabber: dirk.heinri...@altum.de


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot