Skip to contentSkip to conversation

TVP514x V4L int device driver support

PATCH In review [email protected] 20 participants 205 messages Nov 21, 2008 – May 29, 2013 1 message not in the archive Page 2 of 2

Subsystems (8)
lore
Share & tools
lore
#59 lore raw

PATCH 3/5 Added configuration file for AM3517EVM

From: Vaibhav Hiremath <[email protected]>

---
 include/configs/am3517_evm.h |  293 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 293 insertions(+), 0 deletions(-)
 create mode 100644 include/configs/am3517_evm.h
include/configs/am3517_evm.h new file +293 -0
new file mode 100644
index 0000000..d7eef73
@@ -0,0 +1,293 @@
+/*
+ * am3517_evm.h - Configuration settings for the TI's AM3517 EVM board.
+ *
+ * Author: Vaibhav Hiremath <[email protected]>
+ *
+ * Derived from evm code
+ *
+ * Copyright (C) 2009 Texas Instruments Incorporated
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/*
+ * High Level Configuration Options
+ */
+#define CONFIG_ARMCORTEXA8	1	/* This is an ARM V7 CPU core */
+#define CONFIG_OMAP		1	/* in a TI OMAP core */
+#define CONFIG_OMAP34XX		1	/* which is a 34XX */
+#define CONFIG_OMAP3_AM3517EVM	1	/* working with AM3517EVM */
+
+#include <asm/arch/cpu.h>	/* get chip and board defs */
+#include <asm/arch/omap3.h>
+
+/*
+ * Display CPU and Board information
+ */
+#define CONFIG_DISPLAY_CPUINFO		1
+#define CONFIG_DISPLAY_BOARDINFO	1
+
+/* Clock Defines */
+#define V_OSCK			26000000	/* Clock output from T2 */
+#define V_SCLK			(V_OSCK >> 1)
+
+#undef CONFIG_USE_IRQ			/* no support for IRQs */
+#define CONFIG_MISC_INIT_R
+
+#define CONFIG_CMDLINE_TAG		1	/* enable passing of ATAGs */
+#define CONFIG_SETUP_MEMORY_TAGS	1
+#define CONFIG_INITRD_TAG		1
+#define CONFIG_REVISION_TAG		1
+
+/*
+ * Size of malloc() pool
+ */
+#define CONFIG_ENV_SIZE			(128 << 10)	/* 128 KiB */
+						/* Sector */
+#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (128 << 10))
+#define CONFIG_SYS_GBL_DATA_SIZE	128	/* bytes reserved for */
+						/* initial data */
+/*
+ * DDR size interfaced
+ */
+#define CONFIG_SYS_CS0_SIZE             (256 * 1024 * 1024)
+
+/*
+ * Hardware drivers
+ */
+
+/*
+ * NS16550 Configuration
+ */
+#define V_NS16550_CLK			48000000	/* 48MHz (APLL96/2) */
+
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE	(-4)
+#define CONFIG_SYS_NS16550_CLK		V_NS16550_CLK
+
+/*
+ * select serial console configuration
+ */
+#define CONFIG_CONS_INDEX		3
+#define CONFIG_SYS_NS16550_COM3		OMAP34XX_UART3
+#define CONFIG_SERIAL3			3	/* UART3 on AM3517 EVM */
+
+/* allow to overwrite serial and ethaddr */
+#define CONFIG_ENV_OVERWRITE
+#define CONFIG_BAUDRATE			115200
+#define CONFIG_SYS_BAUDRATE_TABLE	{4800, 9600, 19200, 38400, 57600,\
+					115200}
+#define CONFIG_MMC			1
+#define CONFIG_OMAP3_MMC		1
+#define CONFIG_DOS_PARTITION		1
+
+/* commands to include */
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_EXT2		/* EXT2 Support			*/
+#define CONFIG_CMD_FAT		/* FAT support			*/
+#define CONFIG_CMD_JFFS2	/* JFFS2 Support		*/
+
+#define CONFIG_CMD_I2C		/* I2C serial bus support	*/
+#define CONFIG_CMD_MMC		/* MMC support			*/
+#define CONFIG_CMD_NAND		/* NAND support			*/
+
+#undef CONFIG_CMD_FLASH		/* flinfo, erase, protect	*/
+#undef CONFIG_CMD_FPGA		/* FPGA configuration Support	*/
+#undef CONFIG_CMD_IMI		/* iminfo			*/
+#undef CONFIG_CMD_IMLS		/* List all found images	*/
+
+#define CONFIG_SYS_NO_FLASH
+#define CONFIG_HARD_I2C			1
+#define CONFIG_SYS_I2C_SPEED		100000
+#define CONFIG_SYS_I2C_SLAVE		1
+#define CONFIG_SYS_I2C_BUS		0
+#define CONFIG_SYS_I2C_BUS_SELECT	1
+#define CONFIG_DRIVER_OMAP34XX_I2C	1
+
+#undef CONFIG_CMD_NET
+/*
+ * Board NAND Info.
+ */
+#define CONFIG_SYS_NAND_ADDR		NAND_BASE	/* physical address */
+							/* to access nand */
+#define CONFIG_SYS_NAND_BASE		NAND_BASE	/* physical address */
+							/* to access */
+							/* nand at CS0 */
+
+#define CONFIG_SYS_MAX_NAND_DEVICE	1		/* Max number of */
+							/* NAND devices */
+#define CONFIG_SYS_64BIT_VSPRINTF		/* needed for nand_util.c */
+
+#define CONFIG_JFFS2_NAND
+/* nand device jffs2 lives on */
+#define CONFIG_JFFS2_DEV		"nand0"
+/* start of jffs2 partition */
+#define CONFIG_JFFS2_PART_OFFSET	0x680000
+#define CONFIG_JFFS2_PART_SIZE		0xf980000	/* sz of jffs2 part */
+
+/* Environment information */
+#define CONFIG_BOOTDELAY	10
+
+#define CONFIG_BOOTFILE		uImage
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+	"loadaddr=0x82000000\0" \
+	"console=ttyS2,115200n8\0" \
+	"mmcargs=setenv bootargs console=${console} " \
+		"root=/dev/mmcblk0p2 rw " \
+		"rootfstype=ext3 rootwait\0" \
+	"nandargs=setenv bootargs console=${console} " \
+		"root=/dev/mtdblock4 rw " \
+		"rootfstype=jffs2\0" \
+	"loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
+	"bootscript=echo Running bootscript from mmc ...; " \
+		"source ${loadaddr}\0" \
+	"loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
+	"mmcboot=echo Booting from mmc ...; " \
+		"run mmcargs; " \
+		"bootm ${loadaddr}\0" \
+	"nandboot=echo Booting from nand ...; " \
+		"run nandargs; " \
+		"nand read ${loadaddr} 280000 400000; " \
+		"bootm ${loadaddr}\0" \
+
+#define CONFIG_BOOTCOMMAND \
+	"if mmc init; then " \
+		"if run loadbootscript; then " \
+			"run bootscript; " \
+		"else " \
+			"if run loaduimage; then " \
+				"run mmcboot; " \
+			"else run nandboot; " \
+			"fi; " \
+		"fi; " \
+	"else run nandboot; fi"
+
+#define CONFIG_AUTO_COMPLETE	1
+/*
+ * Miscellaneous configurable options
+ */
+#define V_PROMPT		"AM3517_EVM # "
+
+#define CONFIG_SYS_LONGHELP		/* undef to save memory */
+#define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */
+#define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
+#define CONFIG_SYS_PROMPT		V_PROMPT
+#define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size */
+/* Print Buffer Size */
+#define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
+					sizeof(CONFIG_SYS_PROMPT) + 16)
+#define CONFIG_SYS_MAXARGS		16	/* max number of command */
+						/* args */
+/* Boot Argument Buffer Size */
+#define CONFIG_SYS_BARGSIZE		(CONFIG_SYS_CBSIZE)
+/* memtest works on */
+#define CONFIG_SYS_MEMTEST_START	(OMAP34XX_SDRC_CS0)
+#define CONFIG_SYS_MEMTEST_END		(OMAP34XX_SDRC_CS0 + \
+					0x01F00000) /* 31MB */
+
+#define CONFIG_SYS_LOAD_ADDR		(OMAP34XX_SDRC_CS0) /* default load */
+								/* address */
+
+/*
+ * AM3517 has 12 GP timers, they can be driven by the system clock
+ * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
+ * This rate is divided by a local divisor.
+ */
+#define CONFIG_SYS_TIMERBASE		OMAP34XX_GPT2
+#define CONFIG_SYS_PTV			2	/* Divisor: 2^(PTV+1) => 8 */
+#define CONFIG_SYS_HZ			1000
+
+/*-----------------------------------------------------------------------
+ * Stack sizes
+ *
+ * The stack sizes are set up in start.S using the settings below
+ */
+#define CONFIG_STACKSIZE	(128 << 10)	/* regular stack 128 KiB */
+#ifdef CONFIG_USE_IRQ
+#define CONFIG_STACKSIZE_IRQ	(4 << 10)	/* IRQ stack 4 KiB */
+#define CONFIG_STACKSIZE_FIQ	(4 << 10)	/* FIQ stack 4 KiB */
+#endif
+
+/*-----------------------------------------------------------------------
+ * Physical Memory Map
+ */
+#define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */
+#define PHYS_SDRAM_1		OMAP34XX_SDRC_CS0
+#define PHYS_SDRAM_1_SIZE	(32 << 20)	/* at least 32 MiB */
+#define PHYS_SDRAM_2		OMAP34XX_SDRC_CS1
+
+/* SDRAM Bank Allocation method */
+#define SDRC_R_B_C		1
+
+/*-----------------------------------------------------------------------
+ * FLASH and environment organization
+ */
+
+/* **** PISMO SUPPORT *** */
+
+/* Configure the PISMO */
+#define PISMO1_NAND_SIZE		GPMC_SIZE_128M
+#define PISMO1_ONEN_SIZE		GPMC_SIZE_128M
+
+#define CONFIG_SYS_MAX_FLASH_SECT	520	/* max number of sectors */
+						/* on one chip */
+#define CONFIG_SYS_MAX_FLASH_BANKS	2	/* max number of flash banks */
+#define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
+
+#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+
+/* Monitor@start of flash */
+#define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
+
+#define CONFIG_NAND_OMAP_GPMC
+#define GPMC_NAND_ECC_LP_x16_LAYOUT	1
+#define CONFIG_ENV_IS_IN_NAND		1
+#define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
+
+#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
+#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_ENV_ADDR			boot_flash_env_addr
+
+/*-----------------------------------------------------------------------
+ * CFI FLASH driver setup
+ */
+/* timeout values are in ticks */
+#define CONFIG_SYS_FLASH_ERASE_TOUT	(100 * CONFIG_SYS_HZ)
+#define CONFIG_SYS_FLASH_WRITE_TOUT	(100 * CONFIG_SYS_HZ)
+
+/* Flash banks JFFS2 should use */
+#define CONFIG_SYS_MAX_MTD_BANKS	(CONFIG_SYS_MAX_FLASH_BANKS + \
+					CONFIG_SYS_MAX_NAND_DEVICE)
+#define CONFIG_SYS_JFFS2_MEM_NAND
+/* use flash_info[2] */
+#define CONFIG_SYS_JFFS2_FIRST_BANK	CONFIG_SYS_MAX_FLASH_BANKS
+#define CONFIG_SYS_JFFS2_NUM_BANKS	1
+
+#ifndef __ASSEMBLY__
+extern struct gpmc *gpmc_cfg;
+extern unsigned int boot_flash_base;
+extern volatile unsigned int boot_flash_env_addr;
+extern unsigned int boot_flash_off;
+extern unsigned int boot_flash_sec;
+extern unsigned int boot_flash_type;
+#endif
+
+#endif /* __CONFIG_H */
Signature · 1 line
1.6.2.4
#60 lore raw

PATCH 3/5 Added configuration file for AM3517EVM

Dear hvaibhav at ti.com,

Quoted 8 lines · In message <[email protected]> you wrote:

From: Vaibhav Hiremath <[email protected]>

---
 include/configs/am3517_evm.h |  293 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 293 insertions(+), 0 deletions(-)
 create mode 100644 include/configs/am3517_evm.h

See before: this patch must be part of the commit that adds the board code.

include/configs/am3517_evm.h line 291

Quoted 8 lines
include/configs/am3517_evm.h new file +8 -0
+#ifndef __ASSEMBLY__
+extern struct gpmc *gpmc_cfg;
+extern unsigned int boot_flash_base;
+extern volatile unsigned int boot_flash_env_addr;
+extern unsigned int boot_flash_off;
+extern unsigned int boot_flash_sec;
+extern unsigned int boot_flash_type;
+#endif

Please add prototype declarations to some appropriate header file instead.

Best regards,

Wolfgang Denk

Signature · 6 lines
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: wd at denx.de
Es sind ?berhaupt nur die Dummk?pfe, die sich den Befehlen der  M?ch-
tigen  widersetzen.  Um  sie  zu ruinieren ist es genug, ihre Befehle
treu zu erf?llen.                  - Peter Hacks: "Die sch?ne Helena"
#61 lore raw

PATCH 3/5 Added configuration file for AM3517EVM

Quoted 28 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Tuesday, November 24, 2009 1:16 AM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 3/5] Added configuration file for AM3517EVM

Dear hvaibhav at ti.com,

In message <[email protected]> you

Quoted 6 lines · wrote:

From: Vaibhav Hiremath <[email protected]>

---
 include/configs/am3517_evm.h |  293

++++++++++++++++++++++++++++++++++++++++++

Quoted 2 lines
 1 files changed, 293 insertions(+), 0 deletions(-)
 create mode 100644 include/configs/am3517_evm.h

See before: this patch must be part of the commit that adds the board
code.

Quoted 12 lines

include/configs/am3517_evm.h line 291

Quoted 8 lines
include/configs/am3517_evm.h new file +8 -0
+#ifndef __ASSEMBLY__
+extern struct gpmc *gpmc_cfg;
+extern unsigned int boot_flash_base;
+extern volatile unsigned int boot_flash_env_addr;
+extern unsigned int boot_flash_off;
+extern unsigned int boot_flash_sec;
+extern unsigned int boot_flash_type;
+#endif

Please add prototype declarations to some appropriate header file instead.

[Hiremath, Vaibhav] Actually this code is borrowed from OMAP3EVM file, and I think almost all devices handles this same way.

It is bit difficult to handle this, since we are supporting multiple flash devices and these variables are initialized run-time and so the macros below,

CONFIG_SYS_FLASH_BASE,
CONFIG_ENV_OFFSET,
CONFIG_SYS_ENV_SECT_SIZE

I will try to dig bit more on this, but I think as of now we can go with this.

Thanks,
Vaibhav

Quoted 17 lines

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:
wd at denx.de
Es sind ?berhaupt nur die Dummk?pfe, die sich den Befehlen der M?ch-
tigen widersetzen. Um sie zu ruinieren ist es genug, ihre Befehle
treu zu erf?llen. - Peter Hacks: "Die sch?ne
Helena"

#62 lore raw

PATCH 3/5 Added configuration file for AM3517EVM

Quoted 39 lines · Vaibhav
Quoted 26 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Tuesday, November 24, 2009 1:16 AM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 3/5] Added configuration file for AM3517EVM

Dear hvaibhav at ti.com,

In message <[email protected]> you

Quoted 6 lines · wrote:

From: Vaibhav Hiremath <[email protected]>

---
 include/configs/am3517_evm.h |  293

++++++++++++++++++++++++++++++++++++++++++

Quoted 2 lines
 1 files changed, 293 insertions(+), 0 deletions(-)
 create mode 100644 include/configs/am3517_evm.h

See before: this patch must be part of the commit that adds the board
code.

Quoted 11 lines

include/configs/am3517_evm.h line 291

Quoted 8 lines
include/configs/am3517_evm.h new file +8 -0
+#ifndef __ASSEMBLY__
+extern struct gpmc *gpmc_cfg;
+extern unsigned int boot_flash_base;
+extern volatile unsigned int boot_flash_env_addr;
+extern unsigned int boot_flash_off;
+extern unsigned int boot_flash_sec;
+extern unsigned int boot_flash_type;
+#endif

Please add prototype declarations to some appropriate header file instead.

[Hiremath, Vaibhav] Actually this code is borrowed from OMAP3EVM file, and I think almost all devices handles this same way.

Quoted 7 lines

It is bit difficult to handle this, since we are supporting multiple flash devices and these variables are initialized run-time and so the macros below,

CONFIG_SYS_FLASH_BASE,
CONFIG_ENV_OFFSET,
CONFIG_SYS_ENV_SECT_SIZE

I will try to dig bit more on this, but I think as of now we can go with this.

This code is changing so you may want to wait on investing a lot of effort into it. Please see the CM-T35 board submission.
Please review what is already been proposed to fix this for all the omap3's and comment.

Tom

Quoted 7 lines

Thanks,
Vaibhav

Quoted 3 lines

Best regards,

Wolfgang Denk

#63 lore raw

PATCH 3/5 Added configuration file for AM3517EVM

Quoted 59 lines

-----Original Message-----
From: Tom [mailto:Tom.Rix at windriver.com]
Sent: Thursday, November 26, 2009 9:34 PM
To: Hiremath, Vaibhav
Cc: Wolfgang Denk; u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 3/5] Added configuration file for AM3517EVM

Quoted 11 lines · Vaibhav
Quoted 11 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Tuesday, November 24, 2009 1:16 AM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 3/5] Added configuration file for AM3517EVM

Dear hvaibhav at ti.com,

In message <[email protected]>

you

Quoted 26 lines
Quoted 15 lines
Quoted 6 lines · wrote:

From: Vaibhav Hiremath <[email protected]>

---
 include/configs/am3517_evm.h |  293

++++++++++++++++++++++++++++++++++++++++++

Quoted 2 lines
 1 files changed, 293 insertions(+), 0 deletions(-)
 create mode 100644 include/configs/am3517_evm.h

See before: this patch must be part of the commit that adds the board
code.

Quoted 11 lines

include/configs/am3517_evm.h line 291

Quoted 8 lines
include/configs/am3517_evm.h new file +8 -0
+#ifndef __ASSEMBLY__
+extern struct gpmc *gpmc_cfg;
+extern unsigned int boot_flash_base;
+extern volatile unsigned int boot_flash_env_addr;
+extern unsigned int boot_flash_off;
+extern unsigned int boot_flash_sec;
+extern unsigned int boot_flash_type;
+#endif

Please add prototype declarations to some appropriate header file instead.

Quoted 1 line

[Hiremath, Vaibhav] Actually this code is borrowed from OMAP3EVM

file, and I think almost all devices handles this same way.

Quoted 2 lines

It is bit difficult to handle this, since we are supporting

multiple flash devices and these variables are initialized run-time and so the macros below,

Quoted 5 lines

CONFIG_SYS_FLASH_BASE,
CONFIG_ENV_OFFSET,
CONFIG_SYS_ENV_SECT_SIZE

Quoted 9 lines
Quoted 1 line

I will try to dig bit more on this, but I think as of now we can

go with this.

This code is changing so you may want to wait on investing a lot of effort into it. Please see the CM-T35 board submission. Please review what is already been proposed to fix this for all the omap3's and
comment.

[Hiremath, Vaibhav] Thanks for pointing me to this, I will definitely go through this and get back to you if I have any issues/questions.

Thanks,
Vaibhav

Quoted 9 lines

Tom

Quoted 7 lines

Thanks,
Vaibhav

Quoted 3 lines

Best regards,

Wolfgang Denk

#64 lore raw

PATCH 3/5 Added configuration file for AM3517EVM

In reply to Hiremath

Dear "Hiremath, Vaibhav",

Quoted 1 line · In message <[email protected]> you…

...

Quoted 12 lines
Quoted 12 lines

include/configs/am3517_evm.h line 291

Quoted 8 lines
include/configs/am3517_evm.h new file +8 -0
+#ifndef __ASSEMBLY__
+extern struct gpmc *gpmc_cfg;
+extern unsigned int boot_flash_base;
+extern volatile unsigned int boot_flash_env_addr;
+extern unsigned int boot_flash_off;
+extern unsigned int boot_flash_sec;
+extern unsigned int boot_flash_type;
+#endif

Please add prototype declarations to some appropriate header file instead.

Quoted 2 lines

[Hiremath, Vaibhav] Actually this code is borrowed from OMAP3EVM file, and I think almost all devices handles this same way.

Yes, this escaped us before - but now we got aware of this problem we don't want to add more of this (and clean up the existing code ASAP).

Quoted 6 lines

It is bit difficult to handle this, since we are supporting multiple flash devices and these variables are initialized run-time and so the macros below,

CONFIG_SYS_FLASH_BASE,
CONFIG_ENV_OFFSET,
CONFIG_SYS_ENV_SECT_SIZE

Um... I cannot parse this senstence. Some words seem to be missing?

Quoted 1 line

I will try to dig bit more on this, but I think as of now we can go with this.

Sorry, I disagree.

Best regards,

Wolfgang Denk

Signature · 5 lines
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: wd at denx.de
The IQ of the group is the lowest IQ of a member of the group divided
by the number of people in the group.
#65 lore raw

PATCH 4/5 AM3517EVM: Add mux configuration

From: Vaibhav Hiremath <[email protected]>

Updated mux.h file for AM3517 specific mux configuration.

---
 include/asm-arm/arch-omap3/mux.h |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)
include/asm-arm/arch-omap3/mux.h +35 -0
index 0c01c73..9f06fbb 100644
@@ -403,6 +403,41 @@
 #define CONTROL_PADCONF_D2D_SBUSFLAG	0x0260
 #define CONTROL_PADCONF_SDRC_CKE0	0x0262
 #define CONTROL_PADCONF_SDRC_CKE1	0x0264
+/* AM3517 specific */
+#define CONTROL_PADCONF_CCDC_PCLK       0x01E4
+#define CONTROL_PADCONF_CCDC_FIELD      0x01E6
+#define CONTROL_PADCONF_CCDC_HD         0x01E8
+#define CONTROL_PADCONF_CCDC_VD         0x01EA
+#define CONTROL_PADCONF_CCDC_WEN        0x01EC
+#define CONTROL_PADCONF_CCDC_DATA0      0x01EE
+#define CONTROL_PADCONF_CCDC_DATA1      0x01F0
+#define CONTROL_PADCONF_CCDC_DATA2      0x01F2
+#define CONTROL_PADCONF_CCDC_DATA3      0x01F4
+#define CONTROL_PADCONF_CCDC_DATA4      0x01F6
+#define CONTROL_PADCONF_CCDC_DATA5      0x01F8
+#define CONTROL_PADCONF_CCDC_DATA6      0x01FA
+#define CONTROL_PADCONF_CCDC_DATA7      0x01FC
+#define CONTROL_PADCONF_RMII_MDIO_DATA  0x01FE
+#define CONTROL_PADCONF_RMII_MDIO_CLK   0x0200
+#define CONTROL_PADCONF_RMII_RXD0       0x0202
+#define CONTROL_PADCONF_RMII_RXD1       0x0204
+#define CONTROL_PADCONF_RMII_CRS_DV     0x0206
+#define CONTROL_PADCONF_RMII_RXER       0x0208
+#define CONTROL_PADCONF_RMII_TXD0       0x020A
+#define CONTROL_PADCONF_RMII_TXD1       0x020C
+#define CONTROL_PADCONF_RMII_TXEN       0x020E
+#define CONTROL_PADCONF_RMII_50MHZ_CLK  0x0210
+#define CONTROL_PADCONF_USB0_DRVBUS     0x0212
+#define CONTROL_PADCONF_HECC1_TXD       0x0214
+#define CONTROL_PADCONF_HECC1_RXD       0x0216
+#define CONTROL_PADCONF_SYS_BOOT7       0x0218
+#define CONTROL_PADCONF_SDRC_DQS0N      0x021A
+#define CONTROL_PADCONF_SDRC_DQS1N      0x021C
+#define CONTROL_PADCONF_SDRC_DQS2N      0x021E
+#define CONTROL_PADCONF_SDRC_DQS3N      0x0220
+#define CONTROL_PADCONF_STRBEN_DLY0     0x0222
+#define CONTROL_PADCONF_STRBEN_DLY1     0x0224
+#define CONTROL_PADCONF_SYS_BOOT8       0x0226
 
 #define MUX_VAL(OFFSET,VALUE)\
 	writew((VALUE), OMAP34XX_CTRL_BASE + (OFFSET));

--
1.6.2.4

#66 lore raw

PATCH 4/5 AM3517EVM: Add mux configuration

Dear hvaibhav at ti.com,

Quoted 14 lines · In message <[email protected]> you wrote:

From: Vaibhav Hiremath <[email protected]>

Updated mux.h file for AM3517 specific mux configuration.

---
 include/asm-arm/arch-omap3/mux.h |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)
include/asm-arm/arch-omap3/mux.h +0 -0
index 0c01c73..9f06fbb 100644

include/asm-arm/arch-omap3/mux.h line 411

Quoted 9 lines
include/asm-arm/arch-omap3/mux.h +6 -0
@@ -403,6 +403,41 @@
 #define CONTROL_PADCONF_D2D_SBUSFLAG	0x0260
 #define CONTROL_PADCONF_SDRC_CKE0	0x0262
 #define CONTROL_PADCONF_SDRC_CKE1	0x0264
+/* AM3517 specific */
+#define CONTROL_PADCONF_CCDC_PCLK       0x01E4
+#define CONTROL_PADCONF_CCDC_FIELD      0x01E6
+#define CONTROL_PADCONF_CCDC_HD         0x01E8
+#define CONTROL_PADCONF_CCDC_VD         0x01EA
+#define CONTROL_PADCONF_CCDC_WEN        0x01EC

...

Where are these defines used? I think I don't see them in any of the patches of this patch series?

Best regards,

Wolfgang Denk

Signature · 4 lines
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: wd at denx.de
f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng.
#67 lore raw

PATCH 4/5 AM3517EVM: Add mux configuration

Quoted 38 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Tuesday, November 24, 2009 1:19 AM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 4/5] AM3517EVM: Add mux configuration

Dear hvaibhav at ti.com,

In message <[email protected]> you

Quoted 7 lines · wrote:

From: Vaibhav Hiremath <[email protected]>

Updated mux.h file for AM3517 specific mux configuration.

---
 include/asm-arm/arch-omap3/mux.h |   35

+++++++++++++++++++++++++++++++++++

include/asm-

Quoted 3 lines
 1 files changed, 35 insertions(+), 0 deletions(-)
include/asm- renamed from include/asm-arm/arch-omap3/mux.h +0 -0

arm/arch-omap3/mux.h

Quoted 13 lines

index 0c01c73..9f06fbb 100644

include/asm-arm/arch-omap3/mux.h +6 -0
@@ -403,6 +403,41 @@
 #define CONTROL_PADCONF_D2D_SBUSFLAG	0x0260
 #define CONTROL_PADCONF_SDRC_CKE0	0x0262
 #define CONTROL_PADCONF_SDRC_CKE1	0x0264
+/* AM3517 specific */
+#define CONTROL_PADCONF_CCDC_PCLK       0x01E4
+#define CONTROL_PADCONF_CCDC_FIELD      0x01E6
+#define CONTROL_PADCONF_CCDC_HD         0x01E8
+#define CONTROL_PADCONF_CCDC_VD         0x01EA
+#define CONTROL_PADCONF_CCDC_WEN        0x01EC

...

Quoted 3 lines

Where are these defines used? I think I don't see them in any of the patches of this patch series?

[Hiremath, Vaibhav] These are being used in board/ty/am3517/am3517evm.c file under the function set_muxconf_regs().

Thanks,
Vaibhav

Quoted 13 lines

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:
wd at denx.de
f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng.

#68 lore raw

PATCH 4/5 AM3517EVM: Add mux configuration

Quoted 38 lines · Vaibhav
Quoted 38 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Tuesday, November 24, 2009 1:19 AM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 4/5] AM3517EVM: Add mux configuration

Dear hvaibhav at ti.com,

In message <[email protected]> you

Quoted 7 lines · wrote:

From: Vaibhav Hiremath <[email protected]>

Updated mux.h file for AM3517 specific mux configuration.

---
 include/asm-arm/arch-omap3/mux.h |   35

+++++++++++++++++++++++++++++++++++

include/asm-

Quoted 3 lines
 1 files changed, 35 insertions(+), 0 deletions(-)
include/asm- renamed from include/asm-arm/arch-omap3/mux.h +0 -0

arm/arch-omap3/mux.h

Quoted 13 lines

index 0c01c73..9f06fbb 100644

include/asm-arm/arch-omap3/mux.h +6 -0
@@ -403,6 +403,41 @@
 #define CONTROL_PADCONF_D2D_SBUSFLAG	0x0260
 #define CONTROL_PADCONF_SDRC_CKE0	0x0262
 #define CONTROL_PADCONF_SDRC_CKE1	0x0264
+/* AM3517 specific */
+#define CONTROL_PADCONF_CCDC_PCLK       0x01E4
+#define CONTROL_PADCONF_CCDC_FIELD      0x01E6
+#define CONTROL_PADCONF_CCDC_HD         0x01E8
+#define CONTROL_PADCONF_CCDC_VD         0x01EA
+#define CONTROL_PADCONF_CCDC_WEN        0x01EC

...

Quoted 5 lines
Quoted 3 lines

Where are these defines used? I think I don't see them in any of the patches of this patch series?

[Hiremath, Vaibhav] These are being used in board/ty/am3517/am3517evm.c file under the function set_muxconf_regs().

It seems like these defines are only going to be used by the am3517. If this is so, please move them to a board specific file.

Tom

Quoted 6 lines

Thanks,
Vaibhav

Quoted 3 lines

Best regards,

Wolfgang Denk

#69 lore raw

PATCH 4/5 AM3517EVM: Add mux configuration

In reply to Hiremath

Dear "Hiremath, Vaibhav",

Quoted 12 lines · In message <[email protected]> you…
Quoted 12 lines
Quoted 10 lines

#define CONTROL_PADCONF_D2D_SBUSFLAG 0x0260
#define CONTROL_PADCONF_SDRC_CKE0 0x0262
#define CONTROL_PADCONF_SDRC_CKE1 0x0264

include/asm-arm/arch-omap3/mux.h +6 -0
+/* AM3517 specific */
+#define CONTROL_PADCONF_CCDC_PCLK       0x01E4
+#define CONTROL_PADCONF_CCDC_FIELD      0x01E6
+#define CONTROL_PADCONF_CCDC_HD         0x01E8
+#define CONTROL_PADCONF_CCDC_VD         0x01EA
+#define CONTROL_PADCONF_CCDC_WEN        0x01EC

...

Quoted 5 lines
Quoted 3 lines

Where are these defines used? I think I don't see them in any of the patches of this patch series?

[Hiremath, Vaibhav] These are being used in board/ty/am3517/am3517evm.c file under the function set_muxconf_regs().

As Tom noted it probably makes sense to move these to a board specific file.

But then, this looks very much like register offsets for some device. If this should be the case, plase make sure to convert this into a C struct and use appropriate accesor macros.

Best regards,

Wolfgang Denk

Signature · 8 lines
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: wd at denx.de
The so-called "desktop metaphor" of today's workstations  is  instead
an  "airplane-seat"  metaphor.  Anyone who has shuffled a lap full of
papers while seated between two portly passengers will recognize  the
difference -- one can see only a very few things at once.
                                                   - Fred Brooks, Jr.
#70 lore raw

PATCH 5/5 AM3517: Add support for EMIF4

From: Vaibhav Hiremath <[email protected]>

Changes:-

- Created 2 seperate config option
* CONFIG_SDRC (omap34xx family)
* CONFIG_EMIF4 (am3517 family)
- Changed all omap3 dependent file for CONFIG_SDRC

Tested On:-

- AM3517EVM board
- OMAP3EVM board
- BEAGLE board

I would need help here from people to validate this change for SDP/ZOOMx and other OMAP3 version of boards.

---
 cpu/arm_cortexa8/omap3/board.c         |   11 ++-
 cpu/arm_cortexa8/omap3/mem.c           |  110 ++++++++++++++++++++++++++------
 cpu/arm_cortexa8/omap3/sys_info.c      |   12 +++-
 include/asm-arm/arch-omap3/cpu.h       |   26 ++++++++
 include/asm-arm/arch-omap3/mem.h       |   58 ++++++++++++++++-
 include/asm-arm/arch-omap3/sys_proto.h |    4 +
 include/configs/am3517_evm.h           |    6 ++
 include/configs/devkit8000.h           |    4 +
 include/configs/omap3_beagle.h         |    4 +
 include/configs/omap3_evm.h            |    4 +
 include/configs/omap3_overo.h          |    4 +
 include/configs/omap3_pandora.h        |    4 +
 include/configs/omap3_sdp3430.h        |    4 +
 include/configs/omap3_zoom1.h          |    4 +
 include/configs/omap3_zoom2.h          |    4 +
 15 files changed, 233 insertions(+), 26 deletions(-)
cpu/arm_cortexa8/omap3/board.c +8 -3
index dd2c940..ce60f99 100644
@@ -227,7 +227,11 @@ void s_init(void)
 	per_clocks_enable();
 
 	if (!in_sdram)
+#if defined(CONFIG_SDRC)
 		sdrc_init();
+#elif defined(CONFIG_EMIF4)
+		emif4_init();
+#endif
 }
 
 /******************************************************************************
@@ -276,19 +280,20 @@ int dram_init(void)
 	DECLARE_GLOBAL_DATA_PTR;
 	unsigned int size0 = 0, size1 = 0;
 
+	size0 = get_sdr_cs_size(CS0);
 	/*
 	 * If a second bank of DDR is attached to CS1 this is
 	 * where it can be started.  Early init code will init
 	 * memory on CS0.
 	 */
 	if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) {
+#if defined(CONFIG_SDRC)
 		do_sdrc_init(CS1, NOT_EARLY);
 		make_cs1_contiguous();
+#endif
+		size1 = get_sdr_cs_size(CS1);
 	}
 
-	size0 = get_sdr_cs_size(CS0);
-	size1 = get_sdr_cs_size(CS1);
-
 	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
 	gd->bd->bi_dram[0].size = size0;
 	gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + get_sdr_cs_offset(CS1);
cpu/arm_cortexa8/omap3/mem.c +90 -20

128 lines not on this page · raw message

cpu/arm_cortexa8/omap3/sys_info.c +11 -1
index 08fb32e..f396898 100644
@@ -109,8 +109,10 @@ u32 get_cpu_rev(void)
  ****************************************************/
 u32 is_mem_sdr(void)
 {
+#if defined(CONFIG_SDRC)
 	if (readl(&sdrc_base->cs[CS0].mr) == SDRC_MR_0_SDR)
 		return 1;
+#endif
 	return 0;
 }
 
@@ -121,10 +123,16 @@ u32 get_sdr_cs_size(u32 cs)
 {
 	u32 size;
 
+#if defined(CONFIG_EMIF4)
+	/* TODO: Calculate the size based on EMIF4 configuration */
+	size = CONFIG_SYS_CS0_SIZE;
+#elif defined(CONFIG_SDRC)
 	/* get ram size field */
 	size = readl(&sdrc_base->cs[cs].mcfg) >> 8;
 	size &= 0x3FF;		/* remove unwanted bits */
 	size <<= 21;		/* multiply by 2 MiB to find size in MB */
+#endif
+
 	return size;
 }
 
@@ -133,13 +141,15 @@ u32 get_sdr_cs_size(u32 cs)
  ************************************************************************/
 u32 get_sdr_cs_offset(u32 cs)
 {
-	u32 offset;
+	u32 offset = 0;
 
 	if (!cs)
 		return 0;
 
+#if defined(CONFIG_SDRC)
 	offset = readl(&sdrc_base->cs_cfg);
 	offset = (offset & 15) << 27 | (offset & 0x30) >> 17;
+#endif
 
 	return offset;
 }
include/asm-arm/arch-omap3/cpu.h +26 -0
index e51c4f3..f9aacb4 100644
@@ -214,6 +214,32 @@ struct sdrc {
 #endif /* __ASSEMBLY__ */
 #endif /* __KERNEL_STRICT_NAMES */
 
+/* EMIF4 */
+#ifndef __ASSEMBLY__
+typedef struct emif4 {
+	unsigned int sdram_sts;
+	unsigned int sdram_config;
+	unsigned int res1;
+	unsigned int sdram_refresh_ctrl;
+	unsigned int sdram_refresh_ctrl_shdw;
+	unsigned int sdram_time1;
+	unsigned int sdram_time1_shdw;
+	unsigned int sdram_time2;
+	unsigned int sdram_time2_shdw;
+	unsigned int sdram_time3;
+	unsigned int sdram_time3_shdw;
+	unsigned char res2[8];
+	unsigned int sdram_pwr_mgmt;
+	unsigned int sdram_pwr_mgmt_shdw;
+	unsigned char res3[32];
+	unsigned int sdram_iodft_tlgc;
+	unsigned char res4[128];
+	unsigned int ddr_phyctrl1;
+	unsigned int ddr_phyctrl1_shdw;
+	unsigned int ddr_phyctrl2;
+} emif4_t;
+#endif /* __ASSEMBLY__ */
+
 #define DLLPHASE_90		(0x1 << 1)
 #define LOADDLL			(0x1 << 2)
 #define ENADLL			(0x1 << 3)
include/asm-arm/arch-omap3/mem.h +56 -2

76 lines not on this page · raw message

include/asm-arm/arch-omap3/sys_proto.h +4 -0
index 34bd515..cfbc84b 100644
@@ -31,8 +31,12 @@ void prcm_init(void);
 void per_clocks_enable(void);
 
 void memif_init(void);
+#if defined(CONFIG_SDRC)
 void sdrc_init(void);
 void do_sdrc_init(u32, u32);
+#elif defined(CONFIG_EMIF4)
+void emif4_init(void);
+#endif
 void gpmc_init(void);
 void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32 base,
 			u32 size);
include/configs/am3517_evm.h +6 -0
index d7eef73..74e52c1 100644
@@ -62,6 +62,12 @@
 #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (128 << 10))
 #define CONFIG_SYS_GBL_DATA_SIZE	128	/* bytes reserved for */
 						/* initial data */
+
+/*
+ * Support for EMIF4
+ */
+#define CONFIG_EMIF4			1
+
 /*
  * DDR size interfaced
  */
include/configs/devkit8000.h +4 -0
index 1011770..8041416 100644
@@ -66,6 +66,10 @@
 
 /* Hardware drivers */
 
+/*
+ * Support for SDRC
+ */
+#define CONFIG_SDRC			1
 /* DDR - I use Micron DDR */
 #define CONFIG_OMAP3_MICRON_DDR		1
 
include/configs/omap3_beagle.h +4 -0
index 024b9b8..7fb3434 100644
@@ -97,6 +97,10 @@
 #define CONFIG_OMAP3_MMC		1
 #define CONFIG_DOS_PARTITION		1
 
+/*
+ * Support for SDRC
+ */
+#define CONFIG_SDRC			1
 /* DDR - I use Micron DDR */
 #define CONFIG_OMAP3_MICRON_DDR		1
 
include/configs/omap3_evm.h +4 -0
index 36cb5e0..68e0569 100644
@@ -101,6 +101,10 @@
 #define CONFIG_OMAP3_MMC		1
 #define CONFIG_DOS_PARTITION		1
 
+/*
+ * Support for SDRC
+ */
+#define CONFIG_SDRC			1
 /* DDR - I use Micron DDR */
 #define CONFIG_OMAP3_MICRON_DDR		1
 
include/configs/omap3_overo.h +4 -0
index 0f812a7..7ae4f0c 100644
@@ -89,6 +89,10 @@
 #define CONFIG_OMAP3_MMC		1
 #define CONFIG_DOS_PARTITION		1
 
+/*
+ * Support for SDRC
+ */
+#define CONFIG_SDRC			1
 /* DDR - I use Micron DDR */
 #define CONFIG_OMAP3_MICRON_DDR		1
 
include/configs/omap3_pandora.h +4 -0
index 0cafeb8..45c38bf 100644
@@ -92,6 +92,10 @@
 #define CONFIG_OMAP3_MMC		1
 #define CONFIG_DOS_PARTITION		1
 
+/*
+ * Support for SDRC
+ */
+#define CONFIG_SDRC			1
 /* DDR - I use Micron DDR */
 #define CONFIG_OMAP3_MICRON_DDR		1
 
include/configs/omap3_sdp3430.h +4 -0
index d91c8ff..a8deab5 100644
@@ -137,6 +137,10 @@
 #define CONFIG_SYS_I2C_BUS_SELECT	1
 #define CONFIG_DRIVER_OMAP34XX_I2C	1
 
+/*
+ * Support for SDRC
+ */
+#define CONFIG_SDRC			1
 /* DDR - I use Infineon DDR */
 #define CONFIG_OMAP3_INFINEON_DDR	1
 
include/configs/omap3_zoom1.h +4 -0
index 2aef973..17cb3fb 100644
@@ -98,6 +98,10 @@
 #define CONFIG_OMAP3_MMC		1
 #define CONFIG_DOS_PARTITION		1
 
+/*
+ * Support for SDRC
+ */
+#define CONFIG_SDRC			1
 /* DDR - I use Micron DDR */
 #define CONFIG_OMAP3_MICRON_DDR		1
 
include/configs/omap3_zoom2.h +4 -0
index 5b03fb6..cf09832 100644
@@ -98,6 +98,10 @@
 #define CONFIG_OMAP3_MMC		1
 #define CONFIG_DOS_PARTITION		1
 
+/*
+ * Support for SDRC
+ */
+#define CONFIG_SDRC			1
 /* DDR - I use Micron DDR */
 #define CONFIG_OMAP3_MICRON_DDR		1
 

--
1.6.2.4

#71 lore raw

PATCH 5/5 AM3517: Add support for EMIF4

Dear hvaibhav at ti.com,

Quoted 9 lines · In message <[email protected]> you wrote:

From: Vaibhav Hiremath <[email protected]>

Changes:-

- Created 2 seperate config option
* CONFIG_SDRC (omap34xx family)
* CONFIG_EMIF4 (am3517 family)
- Changed all omap3 dependent file for CONFIG_SDRC

Quoted 8 lines

Tested On:-

- AM3517EVM board
- OMAP3EVM board
- BEAGLE board

I would need help here from people to validate this change for SDP/ZOOMx and other OMAP3 version of boards.

This commit adds a lot of #ifdef's - maybe it would make more sense to split code into different files?

Best regards,

Wolfgang Denk

Signature · 6 lines
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: wd at denx.de
You are an excellent tactician, Captain. You let your second in  com-
mand attack while you sit and watch for weakness.
	-- Khan Noonian Singh, "Space Seed", stardate 3141.9
#72 lore raw

PATCH 5/5 AM3517: Add support for EMIF4

Quoted 27 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Tuesday, November 24, 2009 1:21 AM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 5/5] AM3517: Add support for EMIF4

Dear hvaibhav at ti.com,

In message <[email protected]> you

Quoted 15 lines · wrote:

From: Vaibhav Hiremath <[email protected]>

Changes:-

- Created 2 seperate config option
* CONFIG_SDRC (omap34xx family)
* CONFIG_EMIF4 (am3517 family)
- Changed all omap3 dependent file for CONFIG_SDRC

Tested On:-

- AM3517EVM board
- OMAP3EVM board
- BEAGLE board

Quoted 7 lines
Quoted 1 line

I would need help here from people to validate this change for

SDP/ZOOMx

Quoted 1 line

and other OMAP3 version of boards.

This commit adds a lot of #ifdef's - maybe it would make more sense to split code into different files?

[Hiremath, Vaibhav] Initially I thought of this, but since currently AM3517 is the only device in OMAP3 series which uses EMIF and all others use SDRC. So I thought lets start with this approach and get peoples opinion on this, and then we can split the files.

Thanks,
Vaibhav

Quoted 15 lines

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:
wd at denx.de
You are an excellent tactician, Captain. You let your second in com-
mand attack while you sit and watch for weakness.
-- Khan Noonian Singh, "Space Seed", stardate 3141.9

#73 lore raw

PATCH 5/5 AM3517: Add support for EMIF4

Quoted 26 lines · Vaibhav
Quoted 26 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Tuesday, November 24, 2009 1:21 AM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 5/5] AM3517: Add support for EMIF4

Dear hvaibhav at ti.com,

In message <[email protected]> you

Quoted 15 lines · wrote:

From: Vaibhav Hiremath <[email protected]>

Changes:-

- Created 2 seperate config option
* CONFIG_SDRC (omap34xx family)
* CONFIG_EMIF4 (am3517 family)
- Changed all omap3 dependent file for CONFIG_SDRC

Tested On:-

- AM3517EVM board
- OMAP3EVM board
- BEAGLE board

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

I would need help here from people to validate this change for

SDP/ZOOMx

Quoted 1 line

and other OMAP3 version of boards.

This commit adds a lot of #ifdef's - maybe it would make more sense to split code into different files?

[Hiremath, Vaibhav] Initially I thought of this, but since currently AM3517 is the only device in OMAP3 series which uses EMIF and all others use SDRC. So I thought lets start with this approach and get peoples opinion on this, and then we can split the files.

Please split this patch.
Add the logic for the exiting boards as the first patch. Add the logic for the am3517 as the second. This will allow this change to be bisected.

I would prefer each set of defines to have their own file.

Tom

Quoted 22 lines

Thanks,
Vaibhav

Quoted 4 lines

Best regards,

Wolfgang Denk

Quoted 11 lines

--
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:
wd at denx.de
You are an excellent tactician, Captain. You let your second in com-
mand attack while you sit and watch for weakness.
-- Khan Noonian Singh, "Space Seed", stardate 3141.9

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

#74 lore raw

PATCH 5/5 AM3517: Add support for EMIF4

Quoted 49 lines

-----Original Message-----
From: Tom [mailto:Tom.Rix at windriver.com]
Sent: Thursday, November 26, 2009 9:44 PM
To: Hiremath, Vaibhav
Cc: Wolfgang Denk; u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 5/5] AM3517: Add support for EMIF4

Quoted 10 lines · Vaibhav
Quoted 10 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Tuesday, November 24, 2009 1:21 AM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 5/5] AM3517: Add support for EMIF4

Dear hvaibhav at ti.com,

In message <[email protected]>

you

Quoted 12 lines
Quoted 12 lines
Quoted 11 lines · wrote:

From: Vaibhav Hiremath <[email protected]>

Changes:-

- Created 2 seperate config option
* CONFIG_SDRC (omap34xx family)
* CONFIG_EMIF4 (am3517 family)
- Changed all omap3 dependent file for CONFIG_SDRC

Tested On:-

Quoted 8 lines
Quoted 8 lines
Quoted 5 lines

- AM3517EVM board
- OMAP3EVM board
- BEAGLE board

I would need help here from people to validate this change for

SDP/ZOOMx

Quoted 1 line

and other OMAP3 version of boards.

This commit adds a lot of #ifdef's - maybe it would make more

sense

Quoted 3 lines
Quoted 2 lines

to split code into different files?

[Hiremath, Vaibhav] Initially I thought of this, but since

currently AM3517 is the only device in OMAP3 series which uses EMIF and all others use SDRC. So I thought lets start with this approach and get peoples opinion on this, and then we can split the files.

Quoted 1 line
Quoted 5 lines

Please split this patch.
Add the logic for the exiting boards as the first patch. Add the logic for the am3517 as the second. This will allow this change to be bisected.

[Hiremath, Vaibhav] Ok, will do in next version.

Quoted 1 line

I would prefer each set of defines to have their own file.

[Hiremath, Vaibhav] How about taking this is second version?

Thanks,
Vaibhav

Quoted 25 lines

Tom

Quoted 22 lines

Thanks,
Vaibhav

Quoted 4 lines

Best regards,

Wolfgang Denk

Quoted 11 lines

--
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:
wd at denx.de
You are an excellent tactician, Captain. You let your second in com-
mand attack while you sit and watch for weakness.
-- Khan Noonian Singh, "Space Seed", stardate 3141.9

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

#75 lore raw

cover Add Support for AM3517EVM with EMIF4

From: Vaibhav Hiremath <[email protected]>

AM3517 device is high-performance, industrial applications processor designed and developed keeping Software Compatible with OMAP3 Processors.

Differances :-
===========
- The SDRC controller has been replaced with EMIF4.
- Some new IP's got added like, CAN, VPFE, etc...
- Removed ISP completely

This patch series adds support for AM3517EVM along with EMIF4 configuration.

Tested :-
===========
- OMAP3 EVM (both NAND and MMC boot mode)
- OMAP3 BEAGLE (MMC boot mode)
- AM3517 EVM (both NAND and MMC boot mode)

Below are some of the useful links :-
===========
AM3517 device is high-performance, industrial applications processor designed and developed keeping Software Compatible with OMAP3 Processors.

Below are some of the useful links -

Migration from OMAP35x to AM35x :-
http://focus.ti.com/lit/an/sprab91/sprab91.pdf

Specs/TRM :-
http://focus.ti.com/docs/prod/folders/print/am3517.html

EVM Link -:
http://www.logicpd.com/products/development-kits/zoom-am3517-experimenter-kit

Vaibhav Hiremath (3):
OMAP3: Consolidate SDRC related operations
AM35x: Add support for AM3517EVM
AM35x: Add support for EMIF4

 MAINTAINERS                            |    4 +
 Makefile                               |    3 +
 board/ti/am3517evm/Makefile            |   47 ++++
 board/ti/am3517evm/am3517evm.c         |   76 ++++++
 board/ti/am3517evm/am3517evm.h         |  400 ++++++++++++++++++++++++++++++++
 board/ti/am3517evm/config.mk           |   29 +++
 cpu/arm_cortexa8/omap3/Makefile        |    6 +
 cpu/arm_cortexa8/omap3/board.c         |   34 +---
 cpu/arm_cortexa8/omap3/emif4.c         |  160 +++++++++++++
 cpu/arm_cortexa8/omap3/mem.c           |   90 -------
 cpu/arm_cortexa8/omap3/sdrc.c          |  186 +++++++++++++++
 cpu/arm_cortexa8/omap3/sys_info.c      |   42 +----
 include/asm-arm/arch-omap3/cpu.h       |   26 ++
 include/asm-arm/arch-omap3/emif4.h     |   77 ++++++
 include/asm-arm/arch-omap3/mem.h       |   24 ++
 include/asm-arm/arch-omap3/mux.h       |   35 +++
 include/asm-arm/arch-omap3/sys_proto.h |    7 +-
 include/configs/am3517_evm.h           |  293 +++++++++++++++++++++++
 include/configs/omap3_beagle.h         |    2 +
 include/configs/omap3_evm.h            |    2 +
 include/configs/omap3_overo.h          |    2 +
 include/configs/omap3_pandora.h        |    2 +
 include/configs/omap3_sdp3430.h        |    2 +
 include/configs/omap3_zoom1.h          |    2 +
 include/configs/omap3_zoom2.h          |    2 +
 25 files changed, 1387 insertions(+), 166 deletions(-)
 create mode 100644 board/ti/am3517evm/Makefile
 create mode 100644 board/ti/am3517evm/am3517evm.c
 create mode 100644 board/ti/am3517evm/am3517evm.h
 create mode 100644 board/ti/am3517evm/config.mk
 create mode 100644 cpu/arm_cortexa8/omap3/emif4.c
 create mode 100644 cpu/arm_cortexa8/omap3/sdrc.c
 create mode 100644 include/asm-arm/arch-omap3/emif4.h
 create mode 100644 include/configs/am3517_evm.h
#76 lore raw

cover Add Support for AM3517EVM with EMIF4

Quoted 47 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Saturday, January 30, 2010 3:47 PM
To: u-boot at lists.denx.de
Cc: Paulraj, Sandeep; Tom.Rix at windriver.com; Hiremath, Vaibhav
Subject: [PATCH 0/3] Add Support for AM3517EVM with EMIF4

From: Vaibhav Hiremath <[email protected]>

AM3517 device is high-performance, industrial applications processor designed
and developed keeping Software Compatible with OMAP3 Processors.

Differances :-
===========
- The SDRC controller has been replaced with EMIF4.
- Some new IP's got added like, CAN, VPFE, etc...
- Removed ISP completely

This patch series adds support for AM3517EVM along with EMIF4 configuration.

Tested :-
===========
- OMAP3 EVM (both NAND and MMC boot mode)
- OMAP3 BEAGLE (MMC boot mode)
- AM3517 EVM (both NAND and MMC boot mode)

Below are some of the useful links :-
===========
AM3517 device is high-performance, industrial applications processor designed
and developed keeping Software Compatible with OMAP3 Processors.

Below are some of the useful links -

Migration from OMAP35x to AM35x :-
http://focus.ti.com/lit/an/sprab91/sprab91.pdf

Specs/TRM :-
http://focus.ti.com/docs/prod/folders/print/am3517.html

EVM Link -:
http://www.logicpd.com/products/development-kits/zoom-am3517-
experimenter-kit

Quoted 5 lines

Vaibhav Hiremath (3):
OMAP3: Consolidate SDRC related operations
AM35x: Add support for AM3517EVM
AM35x: Add support for EMIF4

[Hiremath, Vaibhav] Sandeep,

Can you please merge these series of patches for next window?

Thanks,
Vaibhav

Quoted 36 lines
 MAINTAINERS                            |    4 +
 Makefile                               |    3 +
 board/ti/am3517evm/Makefile            |   47 ++++
 board/ti/am3517evm/am3517evm.c         |   76 ++++++
 board/ti/am3517evm/am3517evm.h         |  400
++++++++++++++++++++++++++++++++
 board/ti/am3517evm/config.mk           |   29 +++
 cpu/arm_cortexa8/omap3/Makefile        |    6 +
 cpu/arm_cortexa8/omap3/board.c         |   34 +---
 cpu/arm_cortexa8/omap3/emif4.c         |  160 +++++++++++++
 cpu/arm_cortexa8/omap3/mem.c           |   90 -------
 cpu/arm_cortexa8/omap3/sdrc.c          |  186 +++++++++++++++
 cpu/arm_cortexa8/omap3/sys_info.c      |   42 +----
 include/asm-arm/arch-omap3/cpu.h       |   26 ++
 include/asm-arm/arch-omap3/emif4.h     |   77 ++++++
 include/asm-arm/arch-omap3/mem.h       |   24 ++
 include/asm-arm/arch-omap3/mux.h       |   35 +++
 include/asm-arm/arch-omap3/sys_proto.h |    7 +-
 include/configs/am3517_evm.h           |  293
+++++++++++++++++++++++
 include/configs/omap3_beagle.h         |    2 +
 include/configs/omap3_evm.h            |    2 +
 include/configs/omap3_overo.h          |    2 +
 include/configs/omap3_pandora.h        |    2 +
 include/configs/omap3_sdp3430.h        |    2 +
 include/configs/omap3_zoom1.h          |    2 +
 include/configs/omap3_zoom2.h          |    2 +
 25 files changed, 1387 insertions(+), 166 deletions(-)
 create mode 100644 board/ti/am3517evm/Makefile
 create mode 100644 board/ti/am3517evm/am3517evm.c
 create mode 100644 board/ti/am3517evm/am3517evm.h
 create mode 100644 board/ti/am3517evm/config.mk
 create mode 100644 cpu/arm_cortexa8/omap3/emif4.c
 create mode 100644 cpu/arm_cortexa8/omap3/sdrc.c
 create mode 100644 include/asm-arm/arch-omap3/emif4.h
 create mode 100644 include/configs/am3517_evm.h
#77 lore raw

cover Add Support for AM3517EVM with EMIF4

Quoted 9 lines · Vaibhav
Quoted 9 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Saturday, January 30, 2010 3:47 PM
To: u-boot at lists.denx.de
Cc: Paulraj, Sandeep; Tom.Rix at windriver.com; Hiremath, Vaibhav
Subject: [PATCH 0/3] Add Support for AM3517EVM with EMIF4

From: Vaibhav Hiremath <[email protected]>

<snip>

Quoted 5 lines
Quoted 1 line

[Hiremath, Vaibhav] Sandeep,

Can you please merge these series of patches for next window?

This patchset still needs to be reviewed.
I will post my review this weekend.
Tom

#78 lore raw

cover Add Support for AM3517EVM with EMIF4

Quoted 21 lines

-----Original Message-----
From: Tom [mailto:Tom.Rix at windriver.com]
Sent: Wednesday, February 03, 2010 6:54 PM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de; Paulraj, Sandeep
Subject: Re: [PATCH 0/3] Add Support for AM3517EVM with EMIF4

Quoted 9 lines · Vaibhav
Quoted 9 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Saturday, January 30, 2010 3:47 PM
To: u-boot at lists.denx.de
Cc: Paulraj, Sandeep; Tom.Rix at windriver.com; Hiremath, Vaibhav
Subject: [PATCH 0/3] Add Support for AM3517EVM with EMIF4

From: Vaibhav Hiremath <[email protected]>

<snip>

Quoted 1 line
Quoted 1 line
Quoted 7 lines
Quoted 4 lines

[Hiremath, Vaibhav] Sandeep,

Can you please merge these series of patches for next window?

This patchset still needs to be reviewed. I will post my review this weekend.

[Hiremath, Vaibhav] Review comments are always welcomed. Since this is second version and we haven't had any comments last time. I requested to merge.

Looking forward for your comments.

Thanks,
Vaibhav

Quoted 1 line

Tom

#79 lore raw

PATCH 1/3 OMAP3: Consolidate SDRC related operations

From: Vaibhav Hiremath <[email protected]>

Consolidated all SDRC related functions/operations into separate file - sdrc.c.

---
 cpu/arm_cortexa8/omap3/Makefile        |    3 +
 cpu/arm_cortexa8/omap3/board.c         |   34 +------
 cpu/arm_cortexa8/omap3/mem.c           |   90 ---------------
 cpu/arm_cortexa8/omap3/sdrc.c          |  186 ++++++++++++++++++++++++++++++++
 cpu/arm_cortexa8/omap3/sys_info.c      |   42 +-------
 include/asm-arm/arch-omap3/mem.h       |   14 +++
 include/asm-arm/arch-omap3/sys_proto.h |    4 +-
 include/configs/omap3_beagle.h         |    2 +
 include/configs/omap3_evm.h            |    2 +
 include/configs/omap3_overo.h          |    2 +
 include/configs/omap3_pandora.h        |    2 +
 include/configs/omap3_sdp3430.h        |    2 +
 include/configs/omap3_zoom1.h          |    2 +
 include/configs/omap3_zoom2.h          |    2 +
 14 files changed, 221 insertions(+), 166 deletions(-)
 create mode 100644 cpu/arm_cortexa8/omap3/sdrc.c
cpu/arm_cortexa8/omap3/Makefile +3 -0
index 136b163..8cc7802 100644
@@ -33,6 +33,9 @@ COBJS	+= board.o
 COBJS	+= clock.o
 COBJS	+= gpio.o
 COBJS	+= mem.o
+ifdef	CONFIG_SDRC
+COBJS	+= sdrc.o
+endif
 COBJS	+= syslib.o
 COBJS	+= sys_info.o
 COBJS	+= timer.o
cpu/arm_cortexa8/omap3/board.c +1 -33
index 2aa69b3..0bad682 100644
@@ -40,8 +40,6 @@
 
 extern omap3_sysinfo sysinfo;
 
-extern u32 is_mem_sdr(void);
-
 /******************************************************************************
  * Routine: delay
  * Description: spinning delay to use before udelay works
@@ -227,7 +225,7 @@ void s_init(void)
 	per_clocks_enable();
 
 	if (!in_sdram)
-		sdrc_init();
+		mem_init();
 }
 
 /******************************************************************************
@@ -268,36 +266,6 @@ void watchdog_init(void)
 }
 
 /******************************************************************************
- * Routine: dram_init
- * Description: sets uboots idea of sdram size
- *****************************************************************************/
-int dram_init(void)
-{
-	DECLARE_GLOBAL_DATA_PTR;
-	unsigned int size0 = 0, size1 = 0;
-
-	/*
-	 * If a second bank of DDR is attached to CS1 this is
-	 * where it can be started.  Early init code will init
-	 * memory on CS0.
-	 */
-	if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) {
-		do_sdrc_init(CS1, NOT_EARLY);
-		make_cs1_contiguous();
-	}
-
-	size0 = get_sdr_cs_size(CS0);
-	size1 = get_sdr_cs_size(CS1);
-
-	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-	gd->bd->bi_dram[0].size = size0;
-	gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + get_sdr_cs_offset(CS1);
-	gd->bd->bi_dram[1].size = size1;
-
-	return 0;
-}
-
-/******************************************************************************
  * Dummy function to handle errors for EABI incompatibility
  *****************************************************************************/
 void abort(void)
cpu/arm_cortexa8/omap3/mem.c +0 -90

102 lines not on this page · raw message

cpu/arm_cortexa8/omap3/sdrc.c new file +186 -0

186 lines not on this page · raw message

cpu/arm_cortexa8/omap3/sys_info.c +1 -41

54 lines not on this page · raw message

include/asm-arm/arch-omap3/mem.h +14 -0
index 9439758..0f3733f 100644
@@ -270,4 +270,18 @@ enum {
 #define PISMO1_ONEN_BASE	ONENAND_MAP
 #define DBG_MPDB_BASE		DEBUG_BASE
 
+#ifndef __ASSEMBLY__
+/*
+ * Function prototypes
+ */
+void mem_init(void);
+
+u32 is_mem_sdr(void);
+u32 mem_ok(u32 cs);
+
+u32 get_sdr_cs_size(u32);
+u32 get_sdr_cs_offset(u32);
+
+#endif /* __ASSEMBLY__ */
+
 #endif /* endif _MEM_H_ */
include/asm-arm/arch-omap3/sys_proto.h +2 -2
index 34bd515..34e4e0d 100644
@@ -31,8 +31,10 @@ void prcm_init(void);
 void per_clocks_enable(void);
 
 void memif_init(void);
+#if defined(CONFIG_SDRC)
 void sdrc_init(void);
 void do_sdrc_init(u32, u32);
+#endif
 void gpmc_init(void);
 void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32 base,
 			u32 size);
@@ -46,8 +48,6 @@ u32 get_sysboot_value(void);
 u32 is_gpmc_muxed(void);
 u32 get_gpmc0_type(void);
 u32 get_gpmc0_width(void);
-u32 get_sdr_cs_size(u32);
-u32 get_sdr_cs_offset(u32);
 u32 is_running_in_sdram(void);
 u32 is_running_in_sram(void);
 u32 is_running_in_flash(void);
include/configs/omap3_beagle.h +2 -0
index a8abb0e..eeeb324 100644
@@ -37,6 +37,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_BEAGLE	1	/* working with BEAGLE */
 
+#define CONFIG_SDRC		1	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_evm.h +2 -0
index 52cb202..72b2f72 100644
@@ -42,6 +42,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_EVM	1	/* working with EVM */
 
+#define CONFIG_SDRC		1	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>	/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_overo.h +2 -0
index c72fb9d..d36b8f7 100644
@@ -29,6 +29,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_OVERO	1	/* working with overo */
 
+#define CONFIG_SDRC		1	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>	/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_pandora.h +2 -0
index f22fab5..f323d76 100644
@@ -32,6 +32,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_PANDORA	1	/* working with pandora */
 
+#define CONFIG_SDRC		1	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>	/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_sdp3430.h +2 -0
index 4d01933..ce20c9f 100644
@@ -42,6 +42,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_3430SDP	1	/* working with SDP Rev2 */
 
+#define CONFIG_SDRC		1	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_zoom1.h +2 -0
index cdf95c0..22aca38 100644
@@ -38,6 +38,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_ZOOM1	1	/* working with Zoom MDK Rev1 */
 
+#define CONFIG_SDRC		1	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_zoom2.h +2 -0
index 7a8beb8..49bf72f 100644
@@ -39,6 +39,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_ZOOM2	1	/* working with Zoom II */
 
+#define CONFIG_SDRC		1	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>	/* get chip and board defs */
 #include <asm/arch/omap3.h>
 

--
1.6.2.4

#80 lore raw

PATCH 1/3 OMAP3: Consolidate SDRC related operations

Quoted 4 lines · hvaibhav at ti.com

From: Vaibhav Hiremath <[email protected]>

Consolidated all SDRC related functions/operations into separate file - sdrc.c.

Please add a long comment to explain why this is necessary. Something like..
'Generalizing omap memory setup is necessary to support the new emif4 interface that for am3517 uses.. '

Quoted 3 lines

There is a regression.
Please check devkit8000 cpu/arm_cortexa8/omap3/libomap3.a(board.o): In function `checkboard':
.../cpu/arm_cortexa8/omap3/board.c:313: undefined reference to is_mem_sdr' cpu/arm_cortexa8/omap3/libomap3.a(board.o): In function s_init':
.../cpu/arm_cortexa8/omap3/board.c:228: undefined reference to mem_init' cpu/arm_cortexa8/omap3/libomap3.a(mem.o): In function mem_ok':
.../cpu/arm_cortexa8/omap3/mem.c:92: undefined reference to get_sdr_cs_offset' lib_arm/libarm.a(board.o):(.data+0x28): undefined reference to dram_init'

The biggest problem with this patch is that though the comment says it is a code movement patch, it has other changes it in. These changes must be separated into its own patch(s).

Because of these problems, this is only a partial review.

Quoted 3 lines
---
 cpu/arm_cortexa8/omap3/Makefile        |    3 +
 cpu/arm_cortexa8/omap3/board.c         |   34 +------

<snip>

Quoted 8 lines
cpu/arm_cortexa8/omap3/mem.c +0 -0
 			u32 size)
 {
cpu/arm_cortexa8/omap3/sdrc.c new file +0 -0
new file mode 100644
index 0000000..9a46155

cpu/arm_cortexa8/omap3/sdrc.c line 8

Quoted 8 lines
cpu/arm_cortexa8/omap3/sdrc.c new file +8 -0
@@ -0,0 +1,186 @@
+/*
+ * Functions related to SDRC.
+ *
+ * This file has been created after exctracting and consolidating
+ * the SDRC related content from mem.c and board.c.
+ *
+ * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
+ *

Because this is code movement, include the original copyrights

Quoted 16 lines
cpu/arm_cortexa8/omap3/sdrc.c new file +16 -0
+ * 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
+ */
+

<snip>

cpu/arm_cortexa8/omap3/sdrc.c line 149

Quoted 6 lines
cpu/arm_cortexa8/omap3/sdrc.c new file +6 -0
+
+	if (!mem_ok(cs))
+		writel(0, &sdrc_base->cs[cs].mcfg);
+}
+
+/**

Follow the multi-line comment.
Remove the extra '*'
This happens other places in this patch.
Fix globally

Quoted 8 lines

+ * dram_init - Sets uboots idea of sdram size
+ */

cpu/arm_cortexa8/omap3/sdrc.c new file +6 -0
+int dram_init(void)
+{
+	DECLARE_GLOBAL_DATA_PTR;
+	unsigned int size0 = 0, size1 = 0;
+
+	size0 = get_sdr_cs_size(CS0);

cpu/arm_cortexa8/omap3/sdrc.c line 167

Quoted 10 lines
cpu/arm_cortexa8/omap3/sdrc.c new file +10 -0
+	/*
+	 * If a second bank of DDR is attached to CS1 this is
+	 * where it can be started.  Early init code will init
+	 * memory on CS0.
+	 */
+	if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) {
+		do_sdrc_init(CS1, NOT_EARLY);
+		make_cs1_contiguous();
+
+		size1 = get_sdr_cs_size(CS1);

This is different that a code movement change.
The comment of the change does not match what you have done. Split the real changes into a separate patch.

Tom

#81 lore raw

PATCH 1/3 OMAP3: Consolidate SDRC related operations

Quoted 11 lines

-----Original Message-----
From: Tom [mailto:Tom.Rix at windriver.com]
Sent: Sunday, February 07, 2010 9:44 PM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de; Paulraj, Sandeep; Premi, Sanjeev
Subject: Re: [PATCH 1/3] OMAP3: Consolidate SDRC related operations

Quoted 2 lines · hvaibhav at ti.com

From: Vaibhav Hiremath <[email protected]>

Quoted 8 lines
Quoted 2 lines

Consolidated all SDRC related functions/operations into separate file - sdrc.c.

Please add a long comment to explain why this is necessary. Something like..
'Generalizing omap memory setup is necessary to support the new emif4 interface
that for am3517 uses.. '

[Hiremath, Vaibhav] Ok, will update in next version.

Quoted 20 lines
Quoted 4 lines

There is a regression.
Please check devkit8000 cpu/arm_cortexa8/omap3/libomap3.a(board.o): In function `checkboard':
.../cpu/arm_cortexa8/omap3/board.c:313: undefined reference to is_mem_sdr' cpu/arm_cortexa8/omap3/libomap3.a(board.o): In function s_init':
.../cpu/arm_cortexa8/omap3/board.c:228: undefined reference to `mem_init'
cpu/arm_cortexa8/omap3/libomap3.a(mem.o): In function `mem_ok':
.../cpu/arm_cortexa8/omap3/mem.c:92: undefined reference to get_sdr_cs_offset' lib_arm/libarm.a(board.o):(.data+0x28): undefined reference to dram_init'

Quoted 7 lines

The biggest problem with this patch is that though the comment says it is
a code movement patch, it has other changes it in. These changes must
be separated into its own patch(s).

Because of these problems, this is only a partial review.

[Hiremath, Vaibhav] I will separate such changes into separate commit and submit it to list.

Quoted 24 lines
Quoted 4 lines
---
 cpu/arm_cortexa8/omap3/Makefile        |    3 +
 cpu/arm_cortexa8/omap3/board.c         |   34 +------

<snip>

Review

Quoted 3 lines
cpu/arm_cortexa8/omap3/mem.c +0 -0
 			u32 size)
 {
(quoted diff) +0 -0

b/cpu/arm_cortexa8/omap3/sdrc.c

cpu/arm_cortexa8/omap3/sdrc.c line 7

Quoted 12 lines

new file mode 100644
index 0000000..9a46155

cpu/arm_cortexa8/omap3/sdrc.c new file +7 -0
@@ -0,0 +1,186 @@
+/*
+ * Functions related to SDRC.
+ *
+ * This file has been created after exctracting and consolidating
+ * the SDRC related content from mem.c and board.c.
+ *
+ * Copyright (C) 2009 Texas Instruments Incorporated -

http://www.ti.com/

Quoted 3 lines

cpu/arm_cortexa8/omap3/sdrc.c line 8

Quoted 1 line
cpu/arm_cortexa8/omap3/sdrc.c new file +1 -0
+ *

Because this is code movement, include the original copyrights

[Hiremath, Vaibhav] Ok, will update in next version.

Quoted 22 lines

cpu/arm_cortexa8/omap3/sdrc.c

Quoted 7 lines
cpu/arm_cortexa8/omap3/sdrc.c new file +6 -0
+ * 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,

cpu/arm_cortexa8/omap3/sdrc.c

Quoted 5 lines
cpu/arm_cortexa8/omap3/sdrc.c new file +5 -0
+ * 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

Quoted 5 lines
cpu/arm_cortexa8/omap3/sdrc.c new file +5 -0
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+

<snip>

Quoted 11 lines

cpu/arm_cortexa8/omap3/sdrc.c line 149

Quoted 6 lines
cpu/arm_cortexa8/omap3/sdrc.c new file +6 -0
+
+	if (!mem_ok(cs))
+		writel(0, &sdrc_base->cs[cs].mcfg);
+}
+
+/**

Follow the multi-line comment.
Remove the extra '*'
This happens other places in this patch.
Fix globally

[Hiremath, Vaibhav] Ok.

Thanks Tom for the review, I will update the patch series and submit it again.

Thanks,
Vaibhav

Quoted 26 lines
Quoted 5 lines

+ * dram_init - Sets uboots idea of sdram size
+ */

cpu/arm_cortexa8/omap3/sdrc.c new file +2 -0
+int dram_init(void)
+{

cpu/arm_cortexa8/omap3/sdrc.c

Quoted 10 lines
cpu/arm_cortexa8/omap3/sdrc.c new file +10 -0
+	DECLARE_GLOBAL_DATA_PTR;
+	unsigned int size0 = 0, size1 = 0;
+
+	size0 = get_sdr_cs_size(CS0);
+	/*
+	 * If a second bank of DDR is attached to CS1 this is
+	 * where it can be started.  Early init code will init
+	 * memory on CS0.
+	 */
+	if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype ==

DDR_STACKED)) {

cpu/arm_cortexa8/omap3/sdrc.c line 167

Quoted 4 lines
cpu/arm_cortexa8/omap3/sdrc.c new file +4 -0
+		do_sdrc_init(CS1, NOT_EARLY);
+		make_cs1_contiguous();
+
+		size1 = get_sdr_cs_size(CS1);

This is different that a code movement change.
The comment of the change does not match what you have done. Split the real changes into a separate patch.

Tom

#82 lore raw

v2 cover Add Support for AM3517EVM with EMIF4

From: Vaibhav Hiremath <[email protected]>

Changes from V1 (comments provided by Tom Rix):
- Refreshed against latest denx/master.
- Further split SDRC consolidated patch, since it was fixing up one issue in dram_init in addition to code moment.
- Retained copyright for sdrc.c file, since it is barely a code moment.

AM3517 device is high-performance, industrial applications processor designed and developed keeping Software Compatible with OMAP3 Processors.

Differances :-
===========
- The SDRC controller has been replaced with EMIF4.
- Some new IP's got added like, CAN, VPFE, etc...
- Removed ISP completely

This patch series adds support for AM3517EVM along with EMIF4 configuration.

Tested :-
===========
- OMAP3 EVM (both NAND and MMC boot mode)
- AM3517 EVM (both NAND and MMC boot mode)

Build tested on all OMAP3 platforms.

Below are some of the useful links :-
===========
AM3517 device is high-performance, industrial applications processor designed and developed keeping Software Compatible with OMAP3 Processors.

Below are some of the useful links -

Migration from OMAP35x to AM35x :-
http://focus.ti.com/lit/an/sprab91/sprab91.pdf

Specs/TRM :-
http://focus.ti.com/docs/prod/folders/print/am3517.html

EVM Link -:
http://www.logicpd.com/products/development-kits/zoom-am3517-experimenter-kit

Vaibhav Hiremath (4):
omap3: Calculate CS1 size only when SDRC is initialized for CS1
omap3: Consolidate SDRC related operations
AM35x: Add support for AM3517EVM
AM35x: Add support for EMIF4

 Makefile                                    |    3 +
 arch/arm/cpu/arm_cortexa8/omap3/Makefile    |    6 +
 arch/arm/cpu/arm_cortexa8/omap3/board.c     |   34 +---
 arch/arm/cpu/arm_cortexa8/omap3/emif4.c     |  168 +++++++++++
 arch/arm/cpu/arm_cortexa8/omap3/mem.c       |   90 ------
 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c      |  202 +++++++++++++
 arch/arm/cpu/arm_cortexa8/omap3/sys_info.c  |   41 ---
 arch/arm/include/asm/arch-omap3/cpu.h       |   27 ++
 arch/arm/include/asm/arch-omap3/emif4.h     |   79 ++++++
 arch/arm/include/asm/arch-omap3/mem.h       |   13 +
 arch/arm/include/asm/arch-omap3/mux.h       |   36 +++
 arch/arm/include/asm/arch-omap3/sys_proto.h |    7 +-
 board/logicpd/am3517evm/Makefile            |   47 +++
 board/logicpd/am3517evm/am3517evm.c         |   76 +++++
 board/logicpd/am3517evm/am3517evm.h         |  405 +++++++++++++++++++++++++++
 board/logicpd/am3517evm/config.mk           |   30 ++
 include/configs/am3517_evm.h                |  297 ++++++++++++++++++++
 include/configs/devkit8000.h                |    2 +
 include/configs/omap3_beagle.h              |    2 +
 include/configs/omap3_evm.h                 |    2 +
 include/configs/omap3_overo.h               |    2 +
 include/configs/omap3_pandora.h             |    2 +
 include/configs/omap3_sdp3430.h             |    2 +
 include/configs/omap3_zoom1.h               |    2 +
 include/configs/omap3_zoom2.h               |    2 +
 25 files changed, 1411 insertions(+), 166 deletions(-)
 create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/emif4.c
 create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c
 create mode 100644 arch/arm/include/asm/arch-omap3/emif4.h
 create mode 100644 board/logicpd/am3517evm/Makefile
 create mode 100644 board/logicpd/am3517evm/am3517evm.c
 create mode 100644 board/logicpd/am3517evm/am3517evm.h
 create mode 100644 board/logicpd/am3517evm/config.mk
 create mode 100644 include/configs/am3517_evm.h
#83 lore raw

v2 cover Add Support for AM3517EVM with EMIF4

Quoted 89 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Friday, April 23, 2010 8:26 PM
To: u-boot at lists.denx.de
Cc: Paulraj, Sandeep; Tom.Rix at windriver.com; Hiremath, Vaibhav
Subject: [PATCH-V2 0/4] Add Support for AM3517EVM with EMIF4

From: Vaibhav Hiremath <[email protected]>

Changes from V1 (comments provided by Tom Rix):
- Refreshed against latest denx/master.
- Further split SDRC consolidated patch, since it was fixing up one issue in dram_init in addition to code moment.
- Retained copyright for sdrc.c file, since it is barely a code moment.

AM3517 device is high-performance, industrial applications processor designed and developed keeping Software Compatible with OMAP3 Processors.

Differances :-
===========
- The SDRC controller has been replaced with EMIF4.
- Some new IP's got added like, CAN, VPFE, etc...
- Removed ISP completely

This patch series adds support for AM3517EVM along with EMIF4 configuration.

Tested :-
===========
- OMAP3 EVM (both NAND and MMC boot mode)
- AM3517 EVM (both NAND and MMC boot mode)

Build tested on all OMAP3 platforms.

Below are some of the useful links :-
===========
AM3517 device is high-performance, industrial applications processor designed
and developed keeping Software Compatible with OMAP3 Processors.

Below are some of the useful links -

Migration from OMAP35x to AM35x :-
http://focus.ti.com/lit/an/sprab91/sprab91.pdf

Specs/TRM :-
http://focus.ti.com/docs/prod/folders/print/am3517.html

EVM Link -:
http://www.logicpd.com/products/development-kits/zoom-am3517-experimenter-
kit

Vaibhav Hiremath (4):
omap3: Calculate CS1 size only when SDRC is initialized for CS1
omap3: Consolidate SDRC related operations
AM35x: Add support for AM3517EVM
AM35x: Add support for EMIF4

 Makefile                                    |    3 +
 arch/arm/cpu/arm_cortexa8/omap3/Makefile    |    6 +
 arch/arm/cpu/arm_cortexa8/omap3/board.c     |   34 +---
 arch/arm/cpu/arm_cortexa8/omap3/emif4.c     |  168 +++++++++++
 arch/arm/cpu/arm_cortexa8/omap3/mem.c       |   90 ------
 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c      |  202 +++++++++++++
 arch/arm/cpu/arm_cortexa8/omap3/sys_info.c  |   41 ---
 arch/arm/include/asm/arch-omap3/cpu.h       |   27 ++
 arch/arm/include/asm/arch-omap3/emif4.h     |   79 ++++++
 arch/arm/include/asm/arch-omap3/mem.h       |   13 +
 arch/arm/include/asm/arch-omap3/mux.h       |   36 +++
 arch/arm/include/asm/arch-omap3/sys_proto.h |    7 +-
 board/logicpd/am3517evm/Makefile            |   47 +++
 board/logicpd/am3517evm/am3517evm.c         |   76 +++++
 board/logicpd/am3517evm/am3517evm.h         |  405
+++++++++++++++++++++++++++
 board/logicpd/am3517evm/config.mk           |   30 ++
 include/configs/am3517_evm.h                |  297 ++++++++++++++++++++
 include/configs/devkit8000.h                |    2 +
 include/configs/omap3_beagle.h              |    2 +
 include/configs/omap3_evm.h                 |    2 +
 include/configs/omap3_overo.h               |    2 +
 include/configs/omap3_pandora.h             |    2 +
 include/configs/omap3_sdp3430.h             |    2 +
 include/configs/omap3_zoom1.h               |    2 +
 include/configs/omap3_zoom2.h               |    2 +
 25 files changed, 1411 insertions(+), 166 deletions(-)
Quoted 8 lines
 create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/emif4.c
 create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c
 create mode 100644 arch/arm/include/asm/arch-omap3/emif4.h
 create mode 100644 board/logicpd/am3517evm/Makefile
 create mode 100644 board/logicpd/am3517evm/am3517evm.c
 create mode 100644 board/logicpd/am3517evm/am3517evm.h
 create mode 100644 board/logicpd/am3517evm/config.mk
 create mode 100644 include/configs/am3517_evm.h

[Hiremath, Vaibhav] Tom,

A gentle reminder to review this series on patch-sets.

Thanks,
Vaibhav

#84 lore raw

[U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support

From: Vaibhav Hiremath <[email protected]>

The EVMS have been shipping with NAND (instead of OneNAND) as default. So, this patch sets NAND as default.

To choose OneNAND, define CMD_ONENAND instead of CMD_NAND in the config file omap3_evm.h,

Changes from V3 :-
- Added undef statement for CMD_ONENAND.

---
 include/configs/omap3_evm.h |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
include/configs/omap3_evm.h +8 -1
index 0d99f7d..1d31731 100644
@@ -151,7 +151,8 @@
 
 #define CONFIG_CMD_I2C		/* I2C serial bus support	*/
 #define CONFIG_CMD_MMC		/* MMC support			*/
-#define CONFIG_CMD_ONENAND	/* ONENAND support		*/
+#undef CONFIG_CMD_ONENAND	/* ONENAND support		*/
+#define CONFIG_CMD_NAND		/* NAND support			*/
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_PING
 
@@ -306,7 +307,13 @@
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
 #define CONFIG_SYS_ONENAND_BASE		ONENAND_MAP
 
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_NAND_OMAP_GPMC
+#define GPMC_NAND_ECC_LP_x16_LAYOUT	1
+#define CONFIG_ENV_IS_IN_NAND
+#elif defined(CONFIG_CMD_ONENAND)
 #define CONFIG_ENV_IS_IN_ONENAND	1
+#endif
 #define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 

--
1.6.2.4

#85 lore raw

[U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support

Dear hvaibhav at ti.com,

include/configs/omap3_evm.h line 154

Quoted 11 lines · In message <[email protected]> you wrote:
include/configs/omap3_evm.h +1 -1
index 0d99f7d..1d31731 100644
@@ -151,7 +151,8 @@
 
 #define CONFIG_CMD_I2C		/* I2C serial bus support	*/
 #define CONFIG_CMD_MMC		/* MMC support			*/
-#define CONFIG_CMD_ONENAND	/* ONENAND support		*/
+#undef CONFIG_CMD_ONENAND	/* ONENAND support		*/

Please do not #undef what is not #define'd anyway.

Best regards,

Wolfgang Denk

Signature · 6 lines
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: wd at denx.de
What is tolerance? -- it is the consequence of humanity. We  are  all
formed  of frailty and error; let us pardon reciprocally each other's
folly -- that is the first law of nature.                  - Voltaire
#86 lore raw

[U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support

Quoted 18 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Thursday, May 06, 2010 1:31 AM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support

Dear hvaibhav at ti.com,

Quoted 7 lines · In message <[email protected]> you wrote:
include/configs/omap3_evm.h +0 -0
index 0d99f7d..1d31731 100644
@@ -151,7 +151,8 @@
 
Quoted 7 lines

include/configs/omap3_evm.h line 154

Quoted 4 lines
include/configs/omap3_evm.h +1 -1
 #define CONFIG_CMD_I2C		/* I2C serial bus support	*/
 #define CONFIG_CMD_MMC		/* MMC support			*/
-#define CONFIG_CMD_ONENAND	/* ONENAND support		*/
+#undef CONFIG_CMD_ONENAND	/* ONENAND support		*/

Please do not #undef what is not #define'd anyway.

[Hiremath, Vaibhav] This was the initial comment received from Nishanth Menon on very first path, and that's where I added undef line.

The initial patch was something -

include/configs/omap3_evm.h line 155

Quoted 3 lines
include/configs/omap3_evm.h +2 -1
-#define CONFIG_CMD_ONENAND     /* ONENAND support              */
+/*#define CONFIG_CMD_ONENAND*/ /* ONENAND support              */
+#define CONFIG_CMD_NAND        /* NAND support                 */

I do agree that we don't have to undef here, but agreed to Nishant's comment only because from user point of view, if user would like to enable ONENAND support then for him it's easy he just have to comment NAND line and make change this #define. He doesn't have to dig inside code to find out whether ONENAND is supported or not.

Thanks,
Vaibhav

Quoted 12 lines

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: wd at denx.de What is tolerance? -- it is the consequence of humanity. We are all formed of frailty and error; let us pardon reciprocally each other's
folly -- that is the first law of nature. - Voltaire

#87 lore raw

[U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support

Quoted 30 lines · Vaibhav
Quoted 18 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Thursday, May 06, 2010 1:31 AM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support

Dear hvaibhav at ti.com,

Quoted 7 lines · In message <[email protected]> you wrote:
include/configs/omap3_evm.h +0 -0
index 0d99f7d..1d31731 100644
@@ -151,7 +151,8 @@
 
Quoted 7 lines

include/configs/omap3_evm.h

Quoted 4 lines

?#define CONFIG_CMD_I2C ? ? ? ? ? ? /* I2C serial bus support ? ? ? */ ?#define CONFIG_CMD_MMC ? ? ? ? ? ? /* MMC support ? ? ? ? ? ? ? ? ?*/

include/configs/omap3_evm.h +1 -1
-#define CONFIG_CMD_ONENAND /* ONENAND support ? ? ? ? ? ? ?*/
+#undef CONFIG_CMD_ONENAND ?/* ONENAND support ? ? ? ? ? ? ?*/

Please do not #undef what is not #define'd anyway.

[Hiremath, Vaibhav] This was the initial comment received from Nishanth Menon on very first path, and that's where I added undef line.

The initial patch was something -

Quoted 7 lines

Review

Quoted 3 lines
(quoted diff) +2 -1
-#define CONFIG_CMD_ONENAND ? ? /* ONENAND support ? ? ? ? ? ? ?*/
+/*#define CONFIG_CMD_ONENAND*/ /* ONENAND support ? ? ? ? ? ? ?*/
+#define CONFIG_CMD_NAND ? ? ? ?/* NAND support ? ? ? ? ? ? ? ? */

I do agree that we don't have to undef here, but agreed to Nishant's comment only because from user point of view, if user would like to enable ONENAND support then for him it's easy he just have to comment NAND line and make change this #define. He doesn't have to dig inside code to find out whether ONENAND is supported or not.

my 2cents as a background:
platforms such as SDP platforms have three flash devices - nand, onenand and nor - these are development platforms and are meant to bootup from any of these devices based on which ever dip switch is set. having a #undef is more elegant than /* */ and easier to use from a developer perspective.

Regards,
Nishanth Menon

#88 lore raw

[U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support

Dear Nishanth Menon,

Quoted 1 line · In message <[email protected]>…

On Thu, May 6, 2010 at 12:36 AM, Hiremath, Vaibhav <[email protected]> wrote:

...

Quoted 3 lines
Quoted 3 lines

I do agree that we don't have to undef here, but agreed to Nishant's comment only because from user point of view, if user would like to enable ONENAND support then for him it's easy he just have to comment NAND line and make change this #define. He doesn't have to dig inside code to find out whether ONENAND is supported or not.

Well, of course the user _has_ to dig into the code and check if the feature is supported, because there is no information what the "#undef" or the comment means - it can mean anything:

- disabled here and left in so you can easily re-add it if you like
- disabled because known to be unsupported or broken
- disabled because untested
- ...

Quoted 5 lines

platforms such as SDP platforms have three flash devices - nand, onenand and nor - these are development platforms and are meant to bootup from any of these devices based on which ever dip switch is set. having a #undef is more elegant than /* */ and easier to use from a developer perspective.

Please provide one working configuration, or several config options, but don't try to add kind of configuration menues using "#define" / "#undef" lists. These are useless and confusing at best.

Best regards,

Wolfgang Denk

Signature · 5 lines
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: wd at denx.de
Motto of the Electrical Engineer: Working computer hardware is a  lot
like an erect penis: it stays up as long as you don't fuck with it.
#89 lore raw

[U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support

Quoted 24 lines · Wolfgang Denk

Dear Nishanth Menon,

Quoted 1 line · In message <[email protected]>…

On Thu, May 6, 2010 at 12:36 AM, Hiremath, Vaibhav <[email protected]> wrote:

...

Quoted 3 lines
Quoted 3 lines

I do agree that we don't have to undef here, but agreed to Nishant's comment only because from user point of view, if user would like to enable ONENAND support then for him it's easy he just have to comment NAND line and make change this #define. He doesn't have to dig inside code to find out whether ONENAND is supported or not.

Well, of course the user _has_ to dig into the code and check if the feature is supported, because there is no information what the "#undef" or the comment means - it can mean anything:

- disabled here and left in so you can easily re-add it if you like
- disabled because known to be unsupported or broken
- disabled because untested
- ...

Quoted 5 lines

platforms such as SDP platforms have three flash devices - nand, onenand and nor - these are development platforms and are meant to bootup from any of these devices based on which ever dip switch is set. having a #undef is more elegant than /* */ and easier to use from a developer perspective.

Quoted 4 lines

Please provide one working configuration, or several config options, but don't try to add kind of configuration menues using "#define" / "#undef" lists. These are useless and confusing at best.

your points are valid, two options as I see here:
a) build configurations - nand_boot, nor_boot etc..
b) IMHO, the better solution would be to allow the same u-boot to boot from all devices (nand, nor, onenand, mmc) without needing a rebuild. but the neccessity for that is to have environment variable which can be moved around.. TI has an implementation based on an ancient u-boot which actually does this, it will be interesting to know if there are others who may be interested in a similar feature in mainline u-boot.

Regards,
Nishanth Menon

#90 lore raw

[U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support

Dear Nishanth Menon,

Quoted 5 lines · In message <[email protected]>…

your points are valid, two options as I see here:
a) build configurations - nand_boot, nor_boot etc..
b) IMHO, the better solution would be to allow the same u-boot to boot from all devices (nand, nor, onenand, mmc) without needing a rebuild.

b) is clearly the better and more user-friendly solution.

Quoted 2 lines

but the neccessity for that is to have environment variable which can be moved around.. ...

Hm... really? Assuming that all the storage devices are always present, you can decide to use one standard location for the environment independent of where the U-Boot image gets loaded from (that may actually be considered an advantage by some).

Quoted 3 lines

... TI has an implementation based on an ancient u-boot
which actually does this, it will be interesting to know if there are others who may be interested in a similar feature in mainline u-boot.

Sure - please post a patch (as RFC) so we can see what you have in mind.

Best regards,

Wolfgang Denk

Signature · 4 lines
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: wd at denx.de
Always leave room to add an explanation if it doesn't work out.
#91 lore raw

[U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support

Quoted 11 lines · Wolfgang Denk

Dear Nishanth Menon,

Quoted 5 lines · In message <[email protected]>…

your points are valid, two options as I see here:
a) build configurations - nand_boot, nor_boot etc..
b) IMHO, the better solution would be to allow the same u-boot to boot from all devices (nand, nor, onenand, mmc) without needing a rebuild.

b) is clearly the better and more user-friendly solution.

Quoted 7 lines
Quoted 2 lines

but the neccessity for that is to have environment variable which can be moved around.. ...

Hm... really? Assuming that all the storage devices are always present, you can decide to use one standard location for the environment independent of where the U-Boot image gets loaded from (that may actually be considered an advantage by some).

it is like
http://dev.omapzoom.org/?p=bootloader/u-boot.git;a=blob;f=board/omap3430sdp/mem.c;h=a3dad962390b35501c83f8cde1dd2fd1f6d779d6;hb=HEAD#l107

Infact in some of the settings, one of the chips might even not be mapped :(..

yes, one option could have been to use a single flash for all env (in fact some platforms like (if i recollect beagle booting off MMC uses NAND for env) - but is not a nice idea if the usecase is to use that entire flash for filesystem.. so the safe option in general has been to expect the environment to stick to the memory u-boot booted off from..

Quoted 7 lines
Quoted 4 lines

? ? ? ? ? ? ? ... TI has an implementation based on an ancient u-boot which actually does this, it will be interesting to know if there are others who may be interested in a similar feature in mainline u-boot.

Sure - please post a patch (as RFC) so we can see what you have in mind.

Yep.. waiting for my next free cycle ;) i would have pointed as an RFC to the git repo history, unfortunately the transition from clearcase to git was done as a single blob :(

Regards,
Nishanth Menon

#92 lore raw

[U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support

Dear Nishanth Menon,

Quoted 4 lines · In message <[email protected]>…

Yep.. waiting for my next free cycle ;) i would have pointed as an RFC to the git repo history, unfortunately the transition from clearcase to git was done as a single blob :(

Heh. This matches my experience - each and every contact with ClearCase has always been a clear case of PITA :-(

Best regards,

Wolfgang Denk

Signature · 5 lines
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: wd at denx.de
Honest error is to be pitied, not ridiculed.
                                       -- Philip Earl of Chesterfield
#93 lore raw

[U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support

In reply to Wolfgang Denk
Quoted 22 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Thursday, May 06, 2010 4:20 PM
To: Nishanth Menon
Cc: Hiremath, Vaibhav; u-boot at lists.denx.de
Subject: Re: [U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support

Dear Nishanth Menon,

In message <[email protected]>

Quoted 1 line · you

On Thu, May 6, 2010 at 12:36 AM, Hiremath, Vaibhav <[email protected]>

wrote:
...

Quoted 1 line
Quoted 1 line

I do agree that we don't have to undef here, but agreed to Nishant's

comment only because from user point of view, if user would

Quoted 1 line
Quoted 1 line

like to enable ONENAND support then for him it's easy he just have to

comment NAND line and make change this #define. He

Quoted 1 line
Quoted 1 line

doesn't have to dig inside code to find out whether ONENAND is supported

or not.

Quoted 8 lines

Well, of course the user _has_ to dig into the code and check if the feature is supported, because there is no information what the "#undef" or the comment means - it can mean anything:

- disabled here and left in so you can easily re-add it if you like
- disabled because known to be unsupported or broken
- disabled because untested
- ...

[Hiremath, Vaibhav] Ok. Agreed. I will remove undef line and submit the patch.

Thanks,
Vaibhav

Quoted 21 lines
Quoted 6 lines

platforms such as SDP platforms have three flash devices - nand, onenand and nor - these are development platforms and are meant to bootup from any of these devices based on which ever dip switch is set. having a #undef is more elegant than /* */ and easier to use from a developer perspective.

Please provide one working configuration, or several config options, but don't try to add kind of configuration menues using "#define" / "#undef" lists. These are useless and confusing at best.

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: wd at denx.de Motto of the Electrical Engineer: Working computer hardware is a lot like an erect penis: it stays up as long as you don't fuck with it.

#94 lore raw

[U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support

In reply to Hiremath

Dear "Hiremath, Vaibhav",

Quoted 6 lines · In message <[email protected]> you…

I do agree that we don't have to undef here, but agreed to Nishant's comment only because from user point of view, if user would like to enable ONENAND support then for him it's easy he just have to comment NAND line and make change this #define. He doesn't have to dig inside code to find out whether ONENAND is supported or not.

Hm... what makes you think we could assume that commented out code is actually working and can be enabled as we like? This is a highly speculative assumption, and probably more often wrong than right.

Best regards,

Wolfgang Denk

Signature · 5 lines
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: wd at denx.de
Why can you only have two doors on a chicken coop? If it had four  it
would be a chicken sedan.
#95 lore raw

PATCH v2 2/4 omap3: Consolidate SDRC related operations

From: Vaibhav Hiremath <[email protected]>

Consolidated SDRC related functions into one file - sdrc.c

And also replaced sdrc_init with generic memory init function (mem_init), this generalization of omap memory setup is necessary to support the new emif4 interface introduced in AM3517.

---
 arch/arm/cpu/arm_cortexa8/omap3/Makefile    |    3 +
 arch/arm/cpu/arm_cortexa8/omap3/board.c     |   35 +-----
 arch/arm/cpu/arm_cortexa8/omap3/mem.c       |   90 ------------
 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c      |  202 +++++++++++++++++++++++++++
 arch/arm/cpu/arm_cortexa8/omap3/sys_info.c  |   41 ------
 arch/arm/include/asm/arch-omap3/cpu.h       |    3 +
 arch/arm/include/asm/arch-omap3/mem.h       |   13 ++
 arch/arm/include/asm/arch-omap3/sys_proto.h |    4 +-
 include/configs/devkit8000.h                |    2 +
 include/configs/omap3_beagle.h              |    2 +
 include/configs/omap3_evm.h                 |    2 +
 include/configs/omap3_overo.h               |    2 +
 include/configs/omap3_pandora.h             |    2 +
 include/configs/omap3_sdp3430.h             |    2 +
 include/configs/omap3_zoom1.h               |    2 +
 include/configs/omap3_zoom2.h               |    2 +
 16 files changed, 240 insertions(+), 167 deletions(-)
 create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c
arch/arm/cpu/arm_cortexa8/omap3/Makefile +3 -0
index 136b163..8cc7802 100644
@@ -33,6 +33,9 @@ COBJS	+= board.o
 COBJS	+= clock.o
 COBJS	+= gpio.o
 COBJS	+= mem.o
+ifdef	CONFIG_SDRC
+COBJS	+= sdrc.o
+endif
 COBJS	+= syslib.o
 COBJS	+= sys_info.o
 COBJS	+= timer.o
arch/arm/cpu/arm_cortexa8/omap3/board.c +1 -34
index 69a08fd..d2500ca 100644
@@ -40,8 +40,6 @@
 
 extern omap3_sysinfo sysinfo;
 
-extern u32 is_mem_sdr(void);
-
 /******************************************************************************
  * Routine: delay
  * Description: spinning delay to use before udelay works
@@ -233,7 +231,7 @@ void s_init(void)
 	per_clocks_enable();
 
 	if (!in_sdram)
-		sdrc_init();
+		mem_init();
 }
 
 /******************************************************************************
@@ -274,37 +272,6 @@ void watchdog_init(void)
 }
 
 /******************************************************************************
- * Routine: dram_init
- * Description: sets uboots idea of sdram size
- *****************************************************************************/
-int dram_init(void)
-{
-	DECLARE_GLOBAL_DATA_PTR;
-	unsigned int size0 = 0, size1 = 0;
-
-	size0 = get_sdr_cs_size(CS0);
-
-	/*
-	 * If a second bank of DDR is attached to CS1 this is
-	 * where it can be started.  Early init code will init
-	 * memory on CS0.
-	 */
-	if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) {
-		do_sdrc_init(CS1, NOT_EARLY);
-		make_cs1_contiguous();
-
-		size1 = get_sdr_cs_size(CS1);
-	}
-
-	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-	gd->bd->bi_dram[0].size = size0;
-	gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + get_sdr_cs_offset(CS1);
-	gd->bd->bi_dram[1].size = size1;
-
-	return 0;
-}
-
-/******************************************************************************
  * Dummy function to handle errors for EABI incompatibility
  *****************************************************************************/
 void abort(void)
arch/arm/cpu/arm_cortexa8/omap3/mem.c +0 -90

102 lines not on this page · raw message

arch/arm/cpu/arm_cortexa8/omap3/sdrc.c new file +202 -0

202 lines not on this page · raw message

arch/arm/cpu/arm_cortexa8/omap3/sys_info.c +0 -41

53 lines not on this page · raw message

arch/arm/include/asm/arch-omap3/cpu.h +3 -0
index aa8de32..a49af10 100644
@@ -183,6 +183,7 @@ struct sms {
 /* SDRC */
 #ifndef __KERNEL_STRICT_NAMES
 #ifndef __ASSEMBLY__
+#if defined(CONFIG_SDRC)
 struct sdrc_cs {
 	u32 mcfg;		/* 0x80 || 0xB0 */
 	u32 mr;			/* 0x84 || 0xB4 */
@@ -215,6 +216,8 @@ struct sdrc {
 	u8 res4[0xC];
 	struct sdrc_cs cs[2];	/* 0x80 || 0xB0 */
 };
+
+#endif	/* CONFIG_SDRC */
 #endif /* __ASSEMBLY__ */
 #endif /* __KERNEL_STRICT_NAMES */
 
arch/arm/include/asm/arch-omap3/mem.h +13 -0
index 9439758..a78cf9f 100644
@@ -270,4 +270,17 @@ enum {
 #define PISMO1_ONEN_BASE	ONENAND_MAP
 #define DBG_MPDB_BASE		DEBUG_BASE
 
+#ifndef __ASSEMBLY__
+
+/* Function prototypes */
+void mem_init(void);
+
+u32 is_mem_sdr(void);
+u32 mem_ok(u32 cs);
+
+u32 get_sdr_cs_size(u32);
+u32 get_sdr_cs_offset(u32);
+
+#endif	/* __ASSEMBLY__ */
+
 #endif /* endif _MEM_H_ */
arch/arm/include/asm/arch-omap3/sys_proto.h +2 -2
index 34bd515..34e4e0d 100644
@@ -31,8 +31,10 @@ void prcm_init(void);
 void per_clocks_enable(void);
 
 void memif_init(void);
+#if defined(CONFIG_SDRC)
 void sdrc_init(void);
 void do_sdrc_init(u32, u32);
+#endif
 void gpmc_init(void);
 void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32 base,
 			u32 size);
@@ -46,8 +48,6 @@ u32 get_sysboot_value(void);
 u32 is_gpmc_muxed(void);
 u32 get_gpmc0_type(void);
 u32 get_gpmc0_width(void);
-u32 get_sdr_cs_size(u32);
-u32 get_sdr_cs_offset(u32);
 u32 is_running_in_sdram(void);
 u32 is_running_in_sram(void);
 u32 is_running_in_flash(void);
include/configs/devkit8000.h +2 -0
index 7d1332f..1798bc6 100644
@@ -38,6 +38,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_DEVKIT8000	1	/* working with DevKit8000 */
 
+#define CONFIG_SDRC		1	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_beagle.h +2 -0
index 08d79ac..7584063 100644
@@ -37,6 +37,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_BEAGLE	1	/* working with BEAGLE */
 
+#define CONFIG_SDRC		1	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_evm.h +2 -0
index 1d31731..8c17388 100644
@@ -42,6 +42,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_EVM	1	/* working with EVM */
 
+#define CONFIG_SDRC		1	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>	/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_overo.h +2 -0
index a43500b..5ca9f3a 100644
@@ -29,6 +29,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_OVERO	1	/* working with overo */
 
+#define CONFIG_SDRC		1	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>	/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_pandora.h +2 -0
index 945c053..7c62685 100644
@@ -32,6 +32,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_PANDORA	1	/* working with pandora */
 
+#define CONFIG_SDRC		1	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>	/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_sdp3430.h +2 -0
index b4919db..f751592 100644
@@ -42,6 +42,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_3430SDP	1	/* working with SDP Rev2 */
 
+#define CONFIG_SDRC		1	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_zoom1.h +2 -0
index ae7ebf9..30515b0 100644
@@ -38,6 +38,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_ZOOM1	1	/* working with Zoom MDK Rev1 */
 
+#define CONFIG_SDRC		1	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_zoom2.h +2 -0
index c88c732..2861608 100644
@@ -39,6 +39,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_ZOOM2	1	/* working with Zoom II */
 
+#define CONFIG_SDRC		1	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>	/* get chip and board defs */
 #include <asm/arch/omap3.h>
 

--
1.6.2.4

#96 lore raw

PATCH v2 2/4 omap3: Consolidate SDRC related operations

Dear hvaibhav at ti.com,

Quoted 16 lines · In message <[email protected]> you wrote:

From: Vaibhav Hiremath <[email protected]>

Consolidated SDRC related functions into one file - sdrc.c

And also replaced sdrc_init with generic memory init function (mem_init), this generalization of omap memory setup is necessary to support the new emif4 interface introduced in AM3517.

arch/arm/cpu/arm_cortexa8/omap3/Makefile +0 -0
index 136b163..8cc7802 100644

arch/arm/cpu/arm_cortexa8/omap3/Makefile COBJS += board.o · line 38

Quoted 6 lines
arch/arm/cpu/arm_cortexa8/omap3/Makefile +3 -0
@@ -33,6 +33,9 @@ COBJS	+= board.o
 COBJS	+= clock.o
 COBJS	+= gpio.o
 COBJS	+= mem.o
+ifdef	CONFIG_SDRC
+COBJS	+= sdrc.o
+endif

Please don't use 'ifdef" here; instead, use `COBJS-$(CONFIG_SDRC)'

Quoted 13 lines
arch/arm/include/asm/arch-omap3/cpu.h +1 -0
index aa8de32..a49af10 100644
@@ -183,6 +183,7 @@ struct sms {
 /* SDRC */
 #ifndef __KERNEL_STRICT_NAMES
 #ifndef __ASSEMBLY__
+#if defined(CONFIG_SDRC)
 struct sdrc_cs {
 	u32 mcfg;		/* 0x80 || 0xB0 */
 	u32 mr;			/* 0x84 || 0xB4 */

arch/arm/include/asm/arch-omap3/cpu.h struct sdrc { · line 220

Quoted 5 lines
arch/arm/include/asm/arch-omap3/cpu.h +2 -0
@@ -215,6 +216,8 @@ struct sdrc {
 	u8 res4[0xC];
 	struct sdrc_cs cs[2];	/* 0x80 || 0xB0 */
 };
+
+#endif	/* CONFIG_SDRC */

I don't like such a #ifdef here - it is absolutely necessary? Why?

arch/arm/include/asm/arch-omap3/sys_proto.h void prcm_init(void); · line 37

Quoted 12 lines
arch/arm/include/asm/arch-omap3/sys_proto.h +2 -0
index 34bd515..34e4e0d 100644
@@ -31,8 +31,10 @@ void prcm_init(void);
 void per_clocks_enable(void);
 
 void memif_init(void);
+#if defined(CONFIG_SDRC)
 void sdrc_init(void);
 void do_sdrc_init(u32, u32);
+#endif

Ditto - please drop this #ifdef.

Best regards,

Wolfgang Denk

Signature · 5 lines
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: wd at denx.de
People seldom know what they want until you give them what  they  ask
for.
#97 lore raw

PATCH v2 2/4 omap3: Consolidate SDRC related operations

Quoted 11 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Thursday, May 06, 2010 1:38 AM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH-V2 2/4] omap3: Consolidate SDRC related operations

Dear hvaibhav at ti.com,

[Hiremath, Vaibhav] Thanks Denk for your comments, see my response below -

Quoted 14 lines
Quoted 4 lines · In message <[email protected]> you wrote:

From: Vaibhav Hiremath <[email protected]>

Consolidated SDRC related functions into one file - sdrc.c

Review

Quoted 8 lines

And also replaced sdrc_init with generic memory init function (mem_init), this generalization of omap memory setup is necessary to support the new emif4 interface introduced in AM3517.

(quoted diff) +0 -0

b/arch/arm/cpu/arm_cortexa8/omap3/Makefile

Quoted 12 lines

arch/arm/cpu/arm_cortexa8/omap3/Makefile COBJS += board.o · line 38

Quoted 10 lines

index 136b163..8cc7802 100644

arch/arm/cpu/arm_cortexa8/omap3/Makefile +3 -0
@@ -33,6 +33,9 @@ COBJS	+= board.o
 COBJS	+= clock.o
 COBJS	+= gpio.o
 COBJS	+= mem.o
+ifdef	CONFIG_SDRC
+COBJS	+= sdrc.o
+endif

Please don't use 'ifdef" here; instead, use `COBJS-$(CONFIG_SDRC)'

[Hiremath, Vaibhav] ok, will incorporate in next version.

Quoted 14 lines

Review

Quoted 2 lines
(quoted diff) +0 -0

b/arch/arm/include/asm/arch-omap3/cpu.h

Quoted 11 lines

index aa8de32..a49af10 100644

arch/arm/include/asm/arch-omap3/cpu.h +1 -0
@@ -183,6 +183,7 @@ struct sms {
 /* SDRC */
 #ifndef __KERNEL_STRICT_NAMES
 #ifndef __ASSEMBLY__
+#if defined(CONFIG_SDRC)
 struct sdrc_cs {
 	u32 mcfg;		/* 0x80 || 0xB0 */
 	u32 mr;			/* 0x84 || 0xB4 */
Quoted 9 lines

arch/arm/include/asm/arch-omap3/cpu.h struct sdrc { · line 220

Quoted 6 lines
arch/arm/include/asm/arch-omap3/cpu.h +2 -0
@@ -215,6 +216,8 @@ struct sdrc {
 	u8 res4[0xC];
 	struct sdrc_cs cs[2];	/* 0x80 || 0xB0 */
 };
+
+#endif	/* CONFIG_SDRC */

I don't like such a #ifdef here - it is absolutely necessary? Why?

[Hiremath, Vaibhav] Denk,

This is common file being used for all OMAP series of devices (OMAP2, OMAP3 and AM35x family) and OMAP2/3 family supports SDRC controller and AM35x family support EMIF4.

And due to this difference we need to add this #ifdef.

Quoted 8 lines

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/include/asm/arch-omap3/sys_proto.h

Quoted 6 lines

index 34bd515..34e4e0d 100644

arch/arm/include/asm/arch-omap3/sys_proto.h +0 -0
@@ -31,8 +31,10 @@ void prcm_init(void);
 void per_clocks_enable(void);
 
Quoted 8 lines

arch/arm/include/asm/arch-omap3/sys_proto.h void prcm_init(void); · line 37

Quoted 5 lines
arch/arm/include/asm/arch-omap3/sys_proto.h +2 -0
 void memif_init(void);
+#if defined(CONFIG_SDRC)
 void sdrc_init(void);
 void do_sdrc_init(u32, u32);
+#endif

Ditto - please drop this #ifdef.

[Hiremath, Vaibhav] Same as above.

Thanks,
Vaibhav

Quoted 11 lines

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: wd at denx.de People seldom know what they want until you give them what they ask for.

#98 lore raw

PATCH v2 2/4 omap3: Consolidate SDRC related operations

Dear "Hiremath, Vaibhav",

Quoted 23 lines · In message <[email protected]> you…
Quoted 14 lines

Review

Quoted 2 lines
(quoted diff) +0 -0

b/arch/arm/include/asm/arch-omap3/cpu.h

Quoted 11 lines

index aa8de32..a49af10 100644

arch/arm/include/asm/arch-omap3/cpu.h +1 -0
@@ -183,6 +183,7 @@ struct sms {
 /* SDRC */
 #ifndef __KERNEL_STRICT_NAMES
 #ifndef __ASSEMBLY__
+#if defined(CONFIG_SDRC)
 struct sdrc_cs {
 	u32 mcfg;		/* 0x80 || 0xB0 */
 	u32 mr;			/* 0x84 || 0xB4 */
Quoted 9 lines

arch/arm/include/asm/arch-omap3/cpu.h struct sdrc { · line 220

Quoted 6 lines
arch/arm/include/asm/arch-omap3/cpu.h +2 -0
@@ -215,6 +216,8 @@ struct sdrc {
 	u8 res4[0xC];
 	struct sdrc_cs cs[2];	/* 0x80 || 0xB0 */
 };
+
+#endif	/* CONFIG_SDRC */

I don't like such a #ifdef here - it is absolutely necessary? Why?

Quoted 7 lines

[Hiremath, Vaibhav] Denk,

This is common file being used for all OMAP series of devices (OMAP2, OMAP3
and AM35x family) and OMAP2/3 family supports SDRC controller and AM35x fa
mily support EMIF4.

And due to this difference we need to add this #ifdef.

No. If different CPU fmilies need different versions of this struct then they should use separate header files for these.

Quoted 16 lines
Quoted 8 lines

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/include/asm/arch-omap3/sys_proto.h

Quoted 6 lines

index 34bd515..34e4e0d 100644

arch/arm/include/asm/arch-omap3/sys_proto.h +0 -0
@@ -31,8 +31,10 @@ void prcm_init(void);
 void per_clocks_enable(void);
 
Quoted 8 lines

arch/arm/include/asm/arch-omap3/sys_proto.h void prcm_init(void); · line 37

Quoted 5 lines
arch/arm/include/asm/arch-omap3/sys_proto.h +2 -0
 void memif_init(void);
+#if defined(CONFIG_SDRC)
 void sdrc_init(void);
 void do_sdrc_init(u32, u32);
+#endif

Ditto - please drop this #ifdef.

Quoted 1 line

[Hiremath, Vaibhav] Same as above.

Even less so here. The prototypes should not do any harm - just remove the #if/#endif

Best regards,

Wolfgang Denk

Signature · 4 lines
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: wd at denx.de
"Ahead warp factor 1"                                  - Captain Kirk
#99 lore raw

PATCH v2 3/4 AM35x: Add support for AM3517EVM

From: Vaibhav Hiremath <[email protected]>

This patch adds basic support for the AM3517EVM.
It includes:
- Board int file (.c and .h)
- Default configuration file
- Updates for Makefile

---
 Makefile                              |    3 +
 arch/arm/include/asm/arch-omap3/mux.h |   36 +++
 board/logicpd/am3517evm/Makefile      |   47 ++++
 board/logicpd/am3517evm/am3517evm.c   |   76 ++++++
 board/logicpd/am3517evm/am3517evm.h   |  405 +++++++++++++++++++++++++++++++++
 board/logicpd/am3517evm/config.mk     |   30 +++
 include/configs/am3517_evm.h          |  297 ++++++++++++++++++++++++
 7 files changed, 894 insertions(+), 0 deletions(-)
 create mode 100644 board/logicpd/am3517evm/Makefile
 create mode 100644 board/logicpd/am3517evm/am3517evm.c
 create mode 100644 board/logicpd/am3517evm/am3517evm.h
 create mode 100644 board/logicpd/am3517evm/config.mk
 create mode 100644 include/configs/am3517_evm.h
Makefile +3 -0
index 34f10ce..487ae73 100644
@@ -3169,6 +3169,9 @@ omap3_zoom1_config :	unconfig
 omap3_zoom2_config :	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom2 logicpd omap3
 
+am3517_evm_config :	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 am3517evm logicpd omap3
+
 smdkc100_config:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 smdkc100 samsung s5pc1xx
 
arch/arm/include/asm/arch-omap3/mux.h +36 -0
index 0c01c73..8ea47b6 100644
@@ -283,6 +283,7 @@
 /*Control and debug */
 #define CONTROL_PADCONF_SYS_32K		0x0A04
 #define CONTROL_PADCONF_SYS_CLKREQ	0x0A06
+#define CONTROL_PADCONF_SYS_NRESWARM	0x0A08
 #define CONTROL_PADCONF_SYS_NIRQ	0x01E0
 #define CONTROL_PADCONF_SYS_BOOT0	0x0A0A
 #define CONTROL_PADCONF_SYS_BOOT1	0x0A0C
@@ -403,6 +404,41 @@
 #define CONTROL_PADCONF_D2D_SBUSFLAG	0x0260
 #define CONTROL_PADCONF_SDRC_CKE0	0x0262
 #define CONTROL_PADCONF_SDRC_CKE1	0x0264
+/* AM3517 specific */
+#define CONTROL_PADCONF_CCDC_PCLK	0x01E4
+#define CONTROL_PADCONF_CCDC_FIELD	0x01E6
+#define CONTROL_PADCONF_CCDC_HD		0x01E8
+#define CONTROL_PADCONF_CCDC_VD		0x01EA
+#define CONTROL_PADCONF_CCDC_WEN	0x01EC
+#define CONTROL_PADCONF_CCDC_DATA0	0x01EE
+#define CONTROL_PADCONF_CCDC_DATA1	0x01F0
+#define CONTROL_PADCONF_CCDC_DATA2	0x01F2
+#define CONTROL_PADCONF_CCDC_DATA3	0x01F4
+#define CONTROL_PADCONF_CCDC_DATA4	0x01F6
+#define CONTROL_PADCONF_CCDC_DATA5	0x01F8
+#define CONTROL_PADCONF_CCDC_DATA6	0x01FA
+#define CONTROL_PADCONF_CCDC_DATA7	0x01FC
+#define CONTROL_PADCONF_RMII_MDIO_DATA	0x01FE
+#define CONTROL_PADCONF_RMII_MDIO_CLK	0x0200
+#define CONTROL_PADCONF_RMII_RXD0	0x0202
+#define CONTROL_PADCONF_RMII_RXD1	0x0204
+#define CONTROL_PADCONF_RMII_CRS_DV	0x0206
+#define CONTROL_PADCONF_RMII_RXER	0x0208
+#define CONTROL_PADCONF_RMII_TXD0	0x020A
+#define CONTROL_PADCONF_RMII_TXD1	0x020C
+#define CONTROL_PADCONF_RMII_TXEN	0x020E
+#define CONTROL_PADCONF_RMII_50MHZ_CLK	0x0210
+#define CONTROL_PADCONF_USB0_DRVBUS	0x0212
+#define CONTROL_PADCONF_HECC1_TXD	0x0214
+#define CONTROL_PADCONF_HECC1_RXD	0x0216
+#define CONTROL_PADCONF_SYS_BOOT7	0x0218
+#define CONTROL_PADCONF_SDRC_DQS0N	0x021A
+#define CONTROL_PADCONF_SDRC_DQS1N	0x021C
+#define CONTROL_PADCONF_SDRC_DQS2N	0x021E
+#define CONTROL_PADCONF_SDRC_DQS3N	0x0220
+#define CONTROL_PADCONF_STRBEN_DLY0	0x0222
+#define CONTROL_PADCONF_STRBEN_DLY1	0x0224
+#define CONTROL_PADCONF_SYS_BOOT8	0x0226
 
 #define MUX_VAL(OFFSET,VALUE)\
 	writew((VALUE), OMAP34XX_CTRL_BASE + (OFFSET));
board/logicpd/am3517evm/Makefile new file +47 -0

47 lines not on this page · raw message

board/logicpd/am3517evm/am3517evm.c new file +76 -0

76 lines not on this page · raw message

board/logicpd/am3517evm/am3517evm.h new file +405 -0

405 lines not on this page · raw message

board/logicpd/am3517evm/config.mk new file +30 -0
new file mode 100644
index 0000000..f7a35ce
@@ -0,0 +1,30 @@
+#
+# Author: Vaibhav Hiremath <[email protected]>
+#
+# Based on ti/evm/config.mk
+#
+# Copyright (C) 2010
+# Texas Instruments Incorporated - http://www.ti.com/
+#
+# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# Physical Address:
+# 8000'0000 (bank0)
+# A000/0000 (bank1)
+# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000
+# (mem base + reserved)
+
+# For use with external or internal boots.
+TEXT_BASE = 0x80e80000
include/configs/am3517_evm.h new file +297 -0

297 lines not on this page · raw message

--
1.6.2.4

#100 lore raw

PATCH v2 3/4 AM35x: Add support for AM3517EVM

Dear hvaibhav at ti.com,

Quoted 10 lines · In message <[email protected]> you wrote:

From: Vaibhav Hiremath <[email protected]>

This patch adds basic support for the AM3517EVM.
It includes:
- Board int file (.c and .h)
- Default configuration file
- Updates for Makefile

Quoted 14 lines
---
 Makefile                              |    3 +
 arch/arm/include/asm/arch-omap3/mux.h |   36 +++
 board/logicpd/am3517evm/Makefile      |   47 ++++
 board/logicpd/am3517evm/am3517evm.c   |   76 ++++++
 board/logicpd/am3517evm/am3517evm.h   |  405 +++++++++++++++++++++++++++++++++
 board/logicpd/am3517evm/config.mk     |   30 +++
 include/configs/am3517_evm.h          |  297 ++++++++++++++++++++++++
 7 files changed, 894 insertions(+), 0 deletions(-)
 create mode 100644 board/logicpd/am3517evm/Makefile
 create mode 100644 board/logicpd/am3517evm/am3517evm.c
 create mode 100644 board/logicpd/am3517evm/am3517evm.h
 create mode 100644 board/logicpd/am3517evm/config.mk
 create mode 100644 include/configs/am3517_evm.h

Entries to MAKEALL and MAINTAINERS missing.

Makefile omap3_zoom1_config : unconfig · line 3176

Quoted 13 lines
Makefile +3 -0
index 34f10ce..487ae73 100644
@@ -3169,6 +3169,9 @@ omap3_zoom1_config :	unconfig
 omap3_zoom2_config :	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom2 logicpd omap3
 
+am3517_evm_config :	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 am3517evm logicpd omap3
+
 smdkc100_config:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 smdkc100 samsung s5pc1xx

Please keep list sorted.

arch/arm/include/asm/arch-omap3/mux.h line 289

Quoted 12 lines
arch/arm/include/asm/arch-omap3/mux.h +1 -0
index 0c01c73..8ea47b6 100644
@@ -283,6 +283,7 @@
 /*Control and debug */
 #define CONTROL_PADCONF_SYS_32K		0x0A04
 #define CONTROL_PADCONF_SYS_CLKREQ	0x0A06
+#define CONTROL_PADCONF_SYS_NRESWARM	0x0A08
 #define CONTROL_PADCONF_SYS_NIRQ	0x01E0
 #define CONTROL_PADCONF_SYS_BOOT0	0x0A0A
 #define CONTROL_PADCONF_SYS_BOOT1	0x0A0C

CONTROL_PADCONF_SYS_NIRQ looks out of place here. And all this asks to be converted into a proper C struct.

Quoted 5 lines
board/logicpd/am3517evm/Makefile new file +0 -0
new file mode 100644
index 0000000..3c71fef

...

board/logicpd/am3517evm/Makefile line 47

Quoted 4 lines
board/logicpd/am3517evm/Makefile new file +4 -0
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+

Don't add trailing empty lines. [Please check & fix globally.]

Best regards,

Wolfgang Denk

Signature · 6 lines
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: wd at denx.de
Any sufficiently advanced technology is indistinguishable from magic.
Clarke's Third Law       - _Profiles of the Future_ (1962; rev. 1973)
                  ``Hazards of Prophecy: The Failure of Imagination''
#101 lore raw

PATCH v2 3/4 AM35x: Add support for AM3517EVM

Quoted 37 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Thursday, May 06, 2010 1:42 AM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH-V2 3/4] AM35x: Add support for AM3517EVM

Dear hvaibhav at ti.com,

Quoted 8 lines · In message <[email protected]> you wrote:

From: Vaibhav Hiremath <[email protected]>

This patch adds basic support for the AM3517EVM.
It includes:
- Board int file (.c and .h)
- Default configuration file
- Updates for Makefile

Quoted 8 lines
---
 Makefile                              |    3 +
 arch/arm/include/asm/arch-omap3/mux.h |   36 +++
 board/logicpd/am3517evm/Makefile      |   47 ++++
 board/logicpd/am3517evm/am3517evm.c   |   76 ++++++
 board/logicpd/am3517evm/am3517evm.h   |  405

+++++++++++++++++++++++++++++++++

Quoted 8 lines
 board/logicpd/am3517evm/config.mk     |   30 +++
 include/configs/am3517_evm.h          |  297 ++++++++++++++++++++++++
 7 files changed, 894 insertions(+), 0 deletions(-)
 create mode 100644 board/logicpd/am3517evm/Makefile
 create mode 100644 board/logicpd/am3517evm/am3517evm.c
 create mode 100644 board/logicpd/am3517evm/am3517evm.h
 create mode 100644 board/logicpd/am3517evm/config.mk
 create mode 100644 include/configs/am3517_evm.h
Quoted 1 line

Entries to MAKEALL and MAINTAINERS missing.

[Hiremath, Vaibhav] Ok, will add this in next version.

Quoted 9 lines
Quoted 9 lines
Makefile +0 -0
index 34f10ce..487ae73 100644
@@ -3169,6 +3169,9 @@ omap3_zoom1_config :	unconfig
 omap3_zoom2_config :	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom2 logicpd omap3
 
Quoted 8 lines

Makefile omap3_zoom1_config : unconfig · line 3176

Quoted 5 lines
Makefile +3 -0
+am3517_evm_config :	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 am3517evm logicpd omap3
+
 smdkc100_config:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 smdkc100 samsung s5pc1xx

Please keep list sorted.

[Hiremath, Vaibhav] ok, will move up.

Quoted 15 lines

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/include/asm/arch-omap3/mux.h

arch/arm/include/asm/arch-omap3/mux.h line 289

Quoted 11 lines

index 0c01c73..8ea47b6 100644

arch/arm/include/asm/arch-omap3/mux.h +1 -0
@@ -283,6 +283,7 @@
 /*Control and debug */
 #define CONTROL_PADCONF_SYS_32K		0x0A04
 #define CONTROL_PADCONF_SYS_CLKREQ	0x0A06
+#define CONTROL_PADCONF_SYS_NRESWARM	0x0A08
 #define CONTROL_PADCONF_SYS_NIRQ	0x01E0
 #define CONTROL_PADCONF_SYS_BOOT0	0x0A0A
 #define CONTROL_PADCONF_SYS_BOOT1	0x0A0C

CONTROL_PADCONF_SYS_NIRQ looks out of place here.

[Hiremath, Vaibhav] ok I will place it appropriately.

Quoted 2 lines

And all this asks
to be converted into a proper C struct.

[Hiremath, Vaibhav] This is following up the existing way of configuration like all other OMAP devices. I do agree that we need to clean this up.

Can it be done in sub-sequent series of patches on top of this? Let AM3517EVm support goes in. What's your opinion on this?

Quoted 8 lines

Review

Quoted 2 lines
(quoted diff) +0 -0

b/board/logicpd/am3517evm/Makefile

Quoted 4 lines

new file mode 100644
index 0000000..3c71fef

board/logicpd/am3517evm/Makefile new file +0 -0

...

Quoted 7 lines

board/logicpd/am3517evm/Makefile line 47

Quoted 4 lines
board/logicpd/am3517evm/Makefile new file +4 -0
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+

Don't add trailing empty lines. [Please check & fix globally.]

[Hiremath, Vaibhav] Ok, I will cross-check and will fix in next version.

Thanks,
Vaibhav

Quoted 12 lines

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: wd at denx.de Any sufficiently advanced technology is indistinguishable from magic.
Clarke's Third Law - _Profiles of the Future_ (1962; rev. 1973)
``Hazards of Prophecy: The Failure of Imagination''

#102 lore raw

PATCH v2 3/4 AM35x: Add support for AM3517EVM

Dear "Hiremath, Vaibhav",

Quoted 1 line · In message <[email protected]> you…

...

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
arch/arm/include/asm/arch-omap3/mux.h +0 -0

...

Quoted 7 lines
Quoted 2 lines

And all this asks
to be converted into a proper C struct.

[Hiremath, Vaibhav] This is following up the existing way of configuration like all other OMAP devices. I do agree that we need to clean this up.

Can it be done in sub-sequent series of patches on top of this? Let AM3517E Vm support goes in. What's your opinion on this?

Agreed.

Best regards,

Wolfgang Denk

Signature · 5 lines
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: wd at denx.de
It would seem that evil retreats when forcibly confronted
	-- Yarnek of Excalbia, "The Savage Curtain", stardate 5906.5
#103 lore raw

PATCH v2 4/4 AM35x: Add support for EMIF4

From: Vaibhav Hiremath <[email protected]>

This patch adds support for the EMIF4 interface
available in the AM35x processors.

---
 arch/arm/cpu/arm_cortexa8/omap3/Makefile    |    3 +
 arch/arm/cpu/arm_cortexa8/omap3/emif4.c     |  168 +++++++++++++++++++++++++++
 arch/arm/include/asm/arch-omap3/cpu.h       |   24 ++++
 arch/arm/include/asm/arch-omap3/emif4.h     |   79 +++++++++++++
 arch/arm/include/asm/arch-omap3/sys_proto.h |    3 +
 5 files changed, 277 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/emif4.c
 create mode 100644 arch/arm/include/asm/arch-omap3/emif4.h
arch/arm/cpu/arm_cortexa8/omap3/Makefile +3 -0
index 8cc7802..0a23fa5 100644
@@ -36,6 +36,9 @@ COBJS	+= mem.o
 ifdef	CONFIG_SDRC
 COBJS	+= sdrc.o
 endif
+ifdef	CONFIG_EMIF4
+COBJS	+= emif4.o
+endif
 COBJS	+= syslib.o
 COBJS	+= sys_info.o
 COBJS	+= timer.o
arch/arm/cpu/arm_cortexa8/omap3/emif4.c new file +168 -0

168 lines not on this page · raw message

arch/arm/include/asm/arch-omap3/cpu.h +24 -0
index a49af10..25668bd 100644
@@ -217,6 +217,30 @@ struct sdrc {
 	struct sdrc_cs cs[2];	/* 0x80 || 0xB0 */
 };
 
+#elif defined(CONFIG_EMIF4)
+/* EMIF4 */
+typedef struct emif4 {
+	unsigned int sdram_sts;
+	unsigned int sdram_config;
+	unsigned int res1;
+	unsigned int sdram_refresh_ctrl;
+	unsigned int sdram_refresh_ctrl_shdw;
+	unsigned int sdram_time1;
+	unsigned int sdram_time1_shdw;
+	unsigned int sdram_time2;
+	unsigned int sdram_time2_shdw;
+	unsigned int sdram_time3;
+	unsigned int sdram_time3_shdw;
+	unsigned char res2[8];
+	unsigned int sdram_pwr_mgmt;
+	unsigned int sdram_pwr_mgmt_shdw;
+	unsigned char res3[32];
+	unsigned int sdram_iodft_tlgc;
+	unsigned char res4[128];
+	unsigned int ddr_phyctrl1;
+	unsigned int ddr_phyctrl1_shdw;
+	unsigned int ddr_phyctrl2;
+} emif4_t;
 #endif	/* CONFIG_SDRC */
 #endif /* __ASSEMBLY__ */
 #endif /* __KERNEL_STRICT_NAMES */
arch/arm/include/asm/arch-omap3/emif4.h new file +79 -0

79 lines not on this page · raw message

arch/arm/include/asm/arch-omap3/sys_proto.h +3 -0
index 34e4e0d..7b425be 100644
@@ -35,6 +35,9 @@ void memif_init(void);
 void sdrc_init(void);
 void do_sdrc_init(u32, u32);
 #endif
+#if defined(CONFIG_EMIF4)
+void emif4_init(void);
+#endif
 void gpmc_init(void);
 void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32 base,
 			u32 size);

--
1.6.2.4

#104 lore raw

PATCH v2 4/4 AM35x: Add support for EMIF4

Dear hvaibhav at ti.com,

Quoted 22 lines · In message <[email protected]> you wrote:

From: Vaibhav Hiremath <[email protected]>

This patch adds support for the EMIF4 interface
available in the AM35x processors.

---
 arch/arm/cpu/arm_cortexa8/omap3/Makefile    |    3 +
 arch/arm/cpu/arm_cortexa8/omap3/emif4.c     |  168 +++++++++++++++++++++++++++
 arch/arm/include/asm/arch-omap3/cpu.h       |   24 ++++
 arch/arm/include/asm/arch-omap3/emif4.h     |   79 +++++++++++++
 arch/arm/include/asm/arch-omap3/sys_proto.h |    3 +
 5 files changed, 277 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/emif4.c
 create mode 100644 arch/arm/include/asm/arch-omap3/emif4.h
arch/arm/cpu/arm_cortexa8/omap3/Makefile +0 -0
index 8cc7802..0a23fa5 100644

arch/arm/cpu/arm_cortexa8/omap3/Makefile COBJS += mem.o · line 41

Quoted 6 lines
arch/arm/cpu/arm_cortexa8/omap3/Makefile +3 -0
@@ -36,6 +36,9 @@ COBJS	+= mem.o
 ifdef	CONFIG_SDRC
 COBJS	+= sdrc.o
 endif
+ifdef	CONFIG_EMIF4
+COBJS	+= emif4.o
+endif

Don't use ifdef, use COBJS-$(CONFIG_EMIF4) instead.

arch/arm/include/asm/arch-omap3/sys_proto.h void memif_init(void); · line 40

Quoted 11 lines
arch/arm/include/asm/arch-omap3/sys_proto.h +3 -0
index 34e4e0d..7b425be 100644
@@ -35,6 +35,9 @@ void memif_init(void);
 void sdrc_init(void);
 void do_sdrc_init(u32, u32);
 #endif
+#if defined(CONFIG_EMIF4)
+void emif4_init(void);
+#endif

I guess you can omit the #ifdef here, right?

Best regards,

Wolfgang Denk

Signature · 4 lines
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: wd at denx.de
A failure will not appear until a unit has passed final inspection.
#105 lore raw

PATCH v2 4/4 AM35x: Add support for EMIF4

Quoted 46 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Thursday, May 06, 2010 1:44 AM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH-V2 4/4] AM35x: Add support for EMIF4

Dear hvaibhav at ti.com,

Quoted 10 lines · In message <[email protected]> you wrote:

From: Vaibhav Hiremath <[email protected]>

This patch adds support for the EMIF4 interface
available in the AM35x processors.

---
 arch/arm/cpu/arm_cortexa8/omap3/Makefile    |    3 +
 arch/arm/cpu/arm_cortexa8/omap3/emif4.c     |  168

+++++++++++++++++++++++++++

Review

Quoted 8 lines
 arch/arm/include/asm/arch-omap3/cpu.h       |   24 ++++
 arch/arm/include/asm/arch-omap3/emif4.h     |   79 +++++++++++++
 arch/arm/include/asm/arch-omap3/sys_proto.h |    3 +
 5 files changed, 277 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/emif4.c
 create mode 100644 arch/arm/include/asm/arch-omap3/emif4.h
(quoted diff) +0 -0

b/arch/arm/cpu/arm_cortexa8/omap3/Makefile

arch/arm/cpu/arm_cortexa8/omap3/Makefile COBJS += mem.o · line 41

Quoted 10 lines

index 8cc7802..0a23fa5 100644

arch/arm/cpu/arm_cortexa8/omap3/Makefile +3 -0
@@ -36,6 +36,9 @@ COBJS	+= mem.o
 ifdef	CONFIG_SDRC
 COBJS	+= sdrc.o
 endif
+ifdef	CONFIG_EMIF4
+COBJS	+= emif4.o
+endif

Don't use ifdef, use COBJS-$(CONFIG_EMIF4) instead.

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/include/asm/arch-omap3/sys_proto.h

Quoted 13 lines

arch/arm/include/asm/arch-omap3/sys_proto.h void memif_init(void); · line 40

Quoted 10 lines

index 34e4e0d..7b425be 100644

arch/arm/include/asm/arch-omap3/sys_proto.h +3 -0
@@ -35,6 +35,9 @@ void memif_init(void);
 void sdrc_init(void);
 void do_sdrc_init(u32, u32);
 #endif
+#if defined(CONFIG_EMIF4)
+void emif4_init(void);
+#endif

I guess you can omit the #ifdef here, right?

[Hiremath, Vaibhav] Denk,

We have OMAP families supporting both SDRC and EMIF4 (obviously mutually exclusive), so we need to add this #ifdef.

Thanks,
Vaibhav

Quoted 9 lines

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: wd at denx.de A failure will not appear until a unit has passed final inspection.

#106 lore raw

PATCH v2 4/4 AM35x: Add support for EMIF4

Dear "Hiremath, Vaibhav",

Quoted 10 lines · In message <[email protected]> you…
Quoted 10 lines

arch/arm/include/asm/arch-omap3/sys_proto.h void memif_init(void); · line 40

Quoted 7 lines

void sdrc_init(void);
void do_sdrc_init(u32, u32);
#endif

arch/arm/include/asm/arch-omap3/sys_proto.h +3 -0
+#if defined(CONFIG_EMIF4)
+void emif4_init(void);
+#endif

I guess you can omit the #ifdef here, right?

Quoted 4 lines

[Hiremath, Vaibhav] Denk,

We have OMAP families supporting both SDRC and EMIF4 (obviously mutually ex clusive), so we need to add this #ifdef.

What makes you think you need it? Did you try what happens when you just remove the #if/#endif ?

Best regards,

Wolfgang Denk

Signature · 4 lines
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: wd at denx.de
Given a choice between two theories, take the one which is funnier.
#107 lore raw

PATCH v5 1/1 OMAP3EVM: Added NAND support

From: Vaibhav Hiremath <[email protected]>

The EVMS have been shipping with NAND (instead of OneNAND) as default. So, this patch sets NAND as default.

To choose OneNAND, define CMD_ONENAND instead of CMD_NAND in the config file omap3_evm.h,

Changes From V4 :-
- Removed #undef ONENAND line (comment from Denk)
Changes from V3 :-
- Refreshed against latest u-boot/master
Changes from V2 :-
- Added undef statement for CMD_ONENAND.

---
 include/configs/omap3_evm.h |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
include/configs/omap3_evm.h +7 -1
index 0d99f7d..88af492 100644
@@ -151,7 +151,7 @@
 
 #define CONFIG_CMD_I2C		/* I2C serial bus support	*/
 #define CONFIG_CMD_MMC		/* MMC support			*/
-#define CONFIG_CMD_ONENAND	/* ONENAND support		*/
+#define CONFIG_CMD_NAND		/* NAND support			*/
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_PING
 
@@ -306,7 +306,13 @@
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
 #define CONFIG_SYS_ONENAND_BASE		ONENAND_MAP
 
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_NAND_OMAP_GPMC
+#define GPMC_NAND_ECC_LP_x16_LAYOUT	1
+#define CONFIG_ENV_IS_IN_NAND
+#elif defined(CONFIG_CMD_ONENAND)
 #define CONFIG_ENV_IS_IN_ONENAND	1
+#endif
 #define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 

--
1.6.2.4

#108 lore raw

PATCH v5 1/1 OMAP3EVM: Added NAND support

Quoted 15 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Thursday, May 06, 2010 10:49 PM
To: u-boot at lists.denx.de
Cc: wd at denx.de; tom at bumblecow.com; Paulraj, Sandeep; Hiremath, Vaibhav
Subject: [PATCH-V5] OMAP3EVM: Added NAND support

From: Vaibhav Hiremath <[email protected]>

The EVMS have been shipping with NAND (instead of OneNAND) as default. So, this patch sets NAND as default.

To choose OneNAND, define CMD_ONENAND instead of CMD_NAND in the config file omap3_evm.h,

Quoted 7 lines

Changes From V4 :-
- Removed #undef ONENAND line (comment from Denk)
Changes from V3 :-
- Refreshed against latest u-boot/master
Changes from V2 :-
- Added undef statement for CMD_ONENAND.

[Hiremath, Vaibhav] Denk,

If we do not have any further comments, can we merge these patches?

Thanks,
Vaibhav

Quoted 34 lines
---
 include/configs/omap3_evm.h |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
include/configs/omap3_evm.h +7 -2
index 0d99f7d..88af492 100644
@@ -151,7 +151,7 @@
 
 #define CONFIG_CMD_I2C		/* I2C serial bus support	*/
 #define CONFIG_CMD_MMC		/* MMC support			*/
-#define CONFIG_CMD_ONENAND	/* ONENAND support		*/
+#define CONFIG_CMD_NAND		/* NAND support			*/
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_PING
 
@@ -306,7 +306,13 @@
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
 #define CONFIG_SYS_ONENAND_BASE		ONENAND_MAP
 
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_NAND_OMAP_GPMC
+#define GPMC_NAND_ECC_LP_x16_LAYOUT	1
+#define CONFIG_ENV_IS_IN_NAND
+#elif defined(CONFIG_CMD_ONENAND)
 #define CONFIG_ENV_IS_IN_ONENAND	1
+#endif
 #define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
--

1.6.2.4

#109 lore raw

PATCH v5 1/1 OMAP3EVM: Added NAND support

Dear "Hiremath, Vaibhav",

Quoted 18 lines · In message <[email protected]> you…
Quoted 11 lines

Subject: [PATCH-V5] OMAP3EVM: Added NAND support

From: Vaibhav Hiremath <[email protected]>

The EVMS have been shipping with NAND (instead of OneNAND) as default. So, this patch sets NAND as default.

To choose OneNAND, define CMD_ONENAND instead of CMD_NAND in the config file omap3_evm.h,

Quoted 7 lines

Changes From V4 :-
- Removed #undef ONENAND line (comment from Denk)
Changes from V3 :-
- Refreshed against latest u-boot/master
Changes from V2 :-
- Added undef statement for CMD_ONENAND.

Quoted 3 lines

[Hiremath, Vaibhav] Denk,

If we do not have any further comments, can we merge these patches?

The patches you listed are either ARM related and as such to be handdled by the ARM custodian, Tom, and/or NAND related ans as such to be addressed by the NAND custodian, Scott.

I just wait for their pull requests.

Best regards,

Wolfgang Denk

Signature · 7 lines
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: wd at denx.de
"The glory of creation is in its infinite diversity." "And in the way
our differences combine to create meaning and beauty."
	-- Dr. Miranda Jones and Spock, "Is There in Truth No Beauty?",
	   stardate 5630.8
#110 lore raw

PATCH v5 1/1 OMAP3EVM: Added NAND support

Quoted 32 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Tuesday, May 11, 2010 2:29 PM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de; tom at bumblecow.com; Paulraj, Sandeep; Scott Wood
Subject: Re: [PATCH-V5] OMAP3EVM: Added NAND support

Dear "Hiremath, Vaibhav",

In message <[email protected]>

Quoted 20 lines · you
Quoted 11 lines

Subject: [PATCH-V5] OMAP3EVM: Added NAND support

From: Vaibhav Hiremath <[email protected]>

The EVMS have been shipping with NAND (instead of OneNAND) as default. So, this patch sets NAND as default.

To choose OneNAND, define CMD_ONENAND instead of CMD_NAND in the config file omap3_evm.h,

Quoted 7 lines

Changes From V4 :-
- Removed #undef ONENAND line (comment from Denk)
Changes from V3 :-
- Refreshed against latest u-boot/master
Changes from V2 :-
- Added undef statement for CMD_ONENAND.

[Hiremath, Vaibhav] Denk,

Quoted 8 lines
Quoted 1 line

If we do not have any further comments, can we merge these patches?

The patches you listed are either ARM related and as such to be handdled by the ARM custodian, Tom, and/or NAND related ans as such to be addressed by the NAND custodian, Scott.

I just wait for their pull requests.

[Hiremath, Vaibhav] Thanks Denk,

I think all these patches falls under Tom's list.

Tom,

Can you please merge these patches?

Thanks,
Vaibhav

Quoted 13 lines

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: wd at denx.de "The glory of creation is in its infinite diversity." "And in the way our differences combine to create meaning and beauty."

	-- Dr. Miranda Jones and Spock, "Is There in Truth No Beauty?",
	   stardate 5630.8
#111 lore raw

PATCH v5 1/1 OMAP3EVM: Added NAND support

In reply to Wolfgang Denk
Quoted 23 lines · Wolfgang Denk

Dear "Hiremath, Vaibhav",

Quoted 20 lines · In message<[email protected]> you…
Quoted 11 lines

Subject: [PATCH-V5] OMAP3EVM: Added NAND support

From: Vaibhav Hiremath<[email protected]>

The EVMS have been shipping with NAND (instead of OneNAND) as default. So, this patch sets NAND as default.

To choose OneNAND, define CMD_ONENAND instead of CMD_NAND in the config file omap3_evm.h,

Quoted 7 lines

Changes From V4 :-
- Removed #undef ONENAND line (comment from Denk)
Changes from V3 :-
- Refreshed against latest u-boot/master
Changes from V2 :-
- Added undef statement for CMD_ONENAND.

[Hiremath, Vaibhav] Denk,

Quoted 8 lines
Quoted 1 line

If we do not have any further comments, can we merge these patches?

The patches you listed are either ARM related and as such to be handdled by the ARM custodian, Tom, and/or NAND related ans as such to be addressed by the NAND custodian, Scott.

I just wait for their pull requests.

It's a board config change to turn on NAND, not a change to NAND itself, so it should go via the ARM tree.

-Scott

#112 lore raw

PATCH v3 1/2 omap3: Calculate CS1 size only when SDRC is initialized for CS1

From: Vaibhav Hiremath <[email protected]>

The patch makes sure that size for SDRC CS1 gets calculated only when the CS1 SDRC is initialized.

---
 arch/arm/cpu/arm_cortexa8/omap3/board.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
arch/arm/cpu/arm_cortexa8/omap3/board.c +4 -3
index 7b78fa4..69a08fd 100644
@@ -282,6 +282,8 @@ int dram_init(void)
 	DECLARE_GLOBAL_DATA_PTR;
 	unsigned int size0 = 0, size1 = 0;
 
+	size0 = get_sdr_cs_size(CS0);
+
 	/*
 	 * If a second bank of DDR is attached to CS1 this is
 	 * where it can be started.  Early init code will init
@@ -290,10 +292,9 @@ int dram_init(void)
 	if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) {
 		do_sdrc_init(CS1, NOT_EARLY);
 		make_cs1_contiguous();
-	}
 
-	size0 = get_sdr_cs_size(CS0);
-	size1 = get_sdr_cs_size(CS1);
+		size1 = get_sdr_cs_size(CS1);
+	}
 
 	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
 	gd->bd->bi_dram[0].size = size0;

--
1.6.2.4

#113 lore raw

PATCH v3 1/2 omap3: Calculate CS1 size only when SDRC is initialized for CS1

Quoted 10 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Thursday, May 06, 2010 10:52 PM
To: u-boot at lists.denx.de
Cc: wd at denx.de; tom at bumblecow.com; Paulraj, Sandeep; Hiremath, Vaibhav; Premi, Sanjeev
Subject: [PATCH-V3 1/2] omap3: Calculate CS1 size only when SDRC is initialized for CS1

Quoted 5 lines

From: Vaibhav Hiremath <[email protected]>

The patch makes sure that size for SDRC CS1 gets calculated only when the CS1 SDRC is initialized.

[Hiremath, Vaibhav] Denk,

If we do not have any further comments, can we merge these patches?

Thanks,
Vaibhav

Quoted 35 lines
---
 arch/arm/cpu/arm_cortexa8/omap3/board.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
arch/arm/cpu/arm_cortexa8/omap3/board.c +4 -4
index 7b78fa4..69a08fd 100644
@@ -282,6 +282,8 @@ int dram_init(void)
 	DECLARE_GLOBAL_DATA_PTR;
 	unsigned int size0 = 0, size1 = 0;
 
+	size0 = get_sdr_cs_size(CS0);
+
 	/*
 	 * If a second bank of DDR is attached to CS1 this is
 	 * where it can be started.  Early init code will init
@@ -290,10 +292,9 @@ int dram_init(void)
 	if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) {
 		do_sdrc_init(CS1, NOT_EARLY);
 		make_cs1_contiguous();
-	}
 
-	size0 = get_sdr_cs_size(CS0);
-	size1 = get_sdr_cs_size(CS1);
+		size1 = get_sdr_cs_size(CS1);
+	}
 
 	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
 	gd->bd->bi_dram[0].size = size0;
--

1.6.2.4

#114 lore raw

PATCH v3 1/2 omap3: Calculate CS1 size only when SDRC is initialized for CS1

Quoted 19 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Tuesday, May 11, 2010 10:30 AM
To: Hiremath, Vaibhav; u-boot at lists.denx.de
Cc: wd at denx.de; tom at bumblecow.com; Paulraj, Sandeep; Premi, Sanjeev
Subject: RE: [PATCH-V3 1/2] omap3: Calculate CS1 size only when SDRC is initialized for CS1

Quoted 9 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Thursday, May 06, 2010 10:52 PM
To: u-boot at lists.denx.de
Cc: wd at denx.de; tom at bumblecow.com; Paulraj, Sandeep; Hiremath, Vaibhav; Premi, Sanjeev
Subject: [PATCH-V3 1/2] omap3: Calculate CS1 size only when SDRC is initialized for CS1

Quoted 8 lines
Quoted 5 lines

From: Vaibhav Hiremath <[email protected]>

The patch makes sure that size for SDRC CS1 gets calculated only when the CS1 SDRC is initialized.

[Hiremath, Vaibhav] Denk,

If we do not have any further comments, can we merge these patches?

[Hiremath, Vaibhav] Tom,

Can you merge these patches and give pull request to Denk, this is long pending item.

Thanks,
Vaibhav

Quoted 39 lines

Thanks,
Vaibhav

Quoted 35 lines
---
 arch/arm/cpu/arm_cortexa8/omap3/board.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
arch/arm/cpu/arm_cortexa8/omap3/board.c +4 -4
index 7b78fa4..69a08fd 100644
@@ -282,6 +282,8 @@ int dram_init(void)
 	DECLARE_GLOBAL_DATA_PTR;
 	unsigned int size0 = 0, size1 = 0;
 
+	size0 = get_sdr_cs_size(CS0);
+
 	/*
 	 * If a second bank of DDR is attached to CS1 this is
 	 * where it can be started.  Early init code will init
@@ -290,10 +292,9 @@ int dram_init(void)
 	if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) {
 		do_sdrc_init(CS1, NOT_EARLY);
 		make_cs1_contiguous();
-	}
 
-	size0 = get_sdr_cs_size(CS0);
-	size1 = get_sdr_cs_size(CS1);
+		size1 = get_sdr_cs_size(CS1);
+	}
 
 	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
 	gd->bd->bi_dram[0].size = size0;
--

1.6.2.4

#115 lore raw

PATCH v3 1/2 AM35x: Add support for AM3517EVM

From: Vaibhav Hiremath <[email protected]>

This patch adds basic support for the AM3517EVM.
It includes:
- Board int file (.c and .h)
- Default configuration file
- Updates for Makefile

Changes from V2:
- Removed trailing spaces
- Updated MAINTAINERS & MAKEALL for am3517_evm

---
 MAINTAINERS                           |    4 +
 MAKEALL                               |    1 +
 Makefile                              |    3 +
 arch/arm/include/asm/arch-omap3/mux.h |   38 +++-
 board/logicpd/am3517evm/Makefile      |   46 ++++
 board/logicpd/am3517evm/am3517evm.c   |   76 ++++++
 board/logicpd/am3517evm/am3517evm.h   |  405 +++++++++++++++++++++++++++++++++
 board/logicpd/am3517evm/config.mk     |   30 +++
 include/configs/am3517_evm.h          |  296 ++++++++++++++++++++++++
 9 files changed, 898 insertions(+), 1 deletions(-)
 create mode 100644 board/logicpd/am3517evm/Makefile
 create mode 100644 board/logicpd/am3517evm/am3517evm.c
 create mode 100644 board/logicpd/am3517evm/am3517evm.h
 create mode 100644 board/logicpd/am3517evm/config.mk
 create mode 100644 include/configs/am3517_evm.h
MAINTAINERS +4 -0
index 5cbc845..0bc65e1 100644
@@ -798,6 +798,10 @@ Alex Z
 	lart		SA1100
 	dnp1110		SA1110
 
+Vaibhav Hiremath <[email protected]>
+
+	am3517_evm	ARM CORTEX-A8 (AM35x SoC)
+
 -------------------------------------------------------------------------
 
 Unknown / orphaned boards:
MAKEALL +1 -0
index bb09627..cd59daa 100755
@@ -641,6 +641,7 @@ LIST_ARM11="			\
 ## ARM Cortex-A8 Systems
 #########################################################################
 LIST_ARM_CORTEX_A8="		\
+	am3517_evm		\
 	devkit8000		\
 	mx51evk			\
 	omap3_beagle		\
Makefile +3 -0
index 2d96574..57b3491 100644
@@ -3155,6 +3155,9 @@ SMN42_config	:	unconfig
 ## ARM CORTEX Systems
 #########################################################################
 
+am3517_evm_config :	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 am3517evm logicpd omap3
+
 devkit8000_config :	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 devkit8000 timll omap3
 
arch/arm/include/asm/arch-omap3/mux.h +37 -1
index 0c01c73..ffeb982 100644
@@ -283,7 +283,7 @@
 /*Control and debug */
 #define CONTROL_PADCONF_SYS_32K		0x0A04
 #define CONTROL_PADCONF_SYS_CLKREQ	0x0A06
-#define CONTROL_PADCONF_SYS_NIRQ	0x01E0
+#define CONTROL_PADCONF_SYS_NRESWARM	0x0A08
 #define CONTROL_PADCONF_SYS_BOOT0	0x0A0A
 #define CONTROL_PADCONF_SYS_BOOT1	0x0A0C
 #define CONTROL_PADCONF_SYS_BOOT2	0x0A0E
@@ -337,6 +337,7 @@
 #define CONTROL_PADCONF_ETK_D14_ES2	0x05F8
 #define CONTROL_PADCONF_ETK_D15_ES2	0x05FA
 /*Die to Die */
+#define CONTROL_PADCONF_SYS_NIRQ	0x01E0
 #define CONTROL_PADCONF_D2D_MCAD0	0x01E4
 #define CONTROL_PADCONF_D2D_MCAD1	0x01E6
 #define CONTROL_PADCONF_D2D_MCAD2	0x01E8
@@ -403,6 +404,41 @@
 #define CONTROL_PADCONF_D2D_SBUSFLAG	0x0260
 #define CONTROL_PADCONF_SDRC_CKE0	0x0262
 #define CONTROL_PADCONF_SDRC_CKE1	0x0264
+/* AM3517 specific */
+#define CONTROL_PADCONF_CCDC_PCLK	0x01E4
+#define CONTROL_PADCONF_CCDC_FIELD	0x01E6
+#define CONTROL_PADCONF_CCDC_HD		0x01E8
+#define CONTROL_PADCONF_CCDC_VD		0x01EA
+#define CONTROL_PADCONF_CCDC_WEN	0x01EC
+#define CONTROL_PADCONF_CCDC_DATA0	0x01EE
+#define CONTROL_PADCONF_CCDC_DATA1	0x01F0
+#define CONTROL_PADCONF_CCDC_DATA2	0x01F2
+#define CONTROL_PADCONF_CCDC_DATA3	0x01F4
+#define CONTROL_PADCONF_CCDC_DATA4	0x01F6
+#define CONTROL_PADCONF_CCDC_DATA5	0x01F8
+#define CONTROL_PADCONF_CCDC_DATA6	0x01FA
+#define CONTROL_PADCONF_CCDC_DATA7	0x01FC
+#define CONTROL_PADCONF_RMII_MDIO_DATA	0x01FE
+#define CONTROL_PADCONF_RMII_MDIO_CLK	0x0200
+#define CONTROL_PADCONF_RMII_RXD0	0x0202
+#define CONTROL_PADCONF_RMII_RXD1	0x0204
+#define CONTROL_PADCONF_RMII_CRS_DV	0x0206
+#define CONTROL_PADCONF_RMII_RXER	0x0208
+#define CONTROL_PADCONF_RMII_TXD0	0x020A
+#define CONTROL_PADCONF_RMII_TXD1	0x020C
+#define CONTROL_PADCONF_RMII_TXEN	0x020E
+#define CONTROL_PADCONF_RMII_50MHZ_CLK	0x0210
+#define CONTROL_PADCONF_USB0_DRVBUS	0x0212
+#define CONTROL_PADCONF_HECC1_TXD	0x0214
+#define CONTROL_PADCONF_HECC1_RXD	0x0216
+#define CONTROL_PADCONF_SYS_BOOT7	0x0218
+#define CONTROL_PADCONF_SDRC_DQS0N	0x021A
+#define CONTROL_PADCONF_SDRC_DQS1N	0x021C
+#define CONTROL_PADCONF_SDRC_DQS2N	0x021E
+#define CONTROL_PADCONF_SDRC_DQS3N	0x0220
+#define CONTROL_PADCONF_STRBEN_DLY0	0x0222
+#define CONTROL_PADCONF_STRBEN_DLY1	0x0224
+#define CONTROL_PADCONF_SYS_BOOT8	0x0226
 
 #define MUX_VAL(OFFSET,VALUE)\
 	writew((VALUE), OMAP34XX_CTRL_BASE + (OFFSET));
board/logicpd/am3517evm/Makefile new file +46 -0

46 lines not on this page · raw message

board/logicpd/am3517evm/am3517evm.c new file +76 -0

76 lines not on this page · raw message

board/logicpd/am3517evm/am3517evm.h new file +405 -0

405 lines not on this page · raw message

board/logicpd/am3517evm/config.mk new file +30 -0
new file mode 100644
index 0000000..f7a35ce
@@ -0,0 +1,30 @@
+#
+# Author: Vaibhav Hiremath <[email protected]>
+#
+# Based on ti/evm/config.mk
+#
+# Copyright (C) 2010
+# Texas Instruments Incorporated - http://www.ti.com/
+#
+# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# Physical Address:
+# 8000'0000 (bank0)
+# A000/0000 (bank1)
+# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000
+# (mem base + reserved)
+
+# For use with external or internal boots.
+TEXT_BASE = 0x80e80000
include/configs/am3517_evm.h new file +296 -0

296 lines not on this page · raw message

--
1.6.2.4

#116 lore raw

PATCH v3 1/2 AM35x: Add support for AM3517EVM

Quoted 16 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Thursday, May 06, 2010 10:53 PM
To: u-boot at lists.denx.de
Cc: wd at denx.de; tom at bumblecow.com; Paulraj, Sandeep; Hiremath, Vaibhav; Premi, Sanjeev
Subject: [PATCH-V3 1/2] AM35x: Add support for AM3517EVM

From: Vaibhav Hiremath <[email protected]>

This patch adds basic support for the AM3517EVM.
It includes:
- Board int file (.c and .h)
- Default configuration file
- Updates for Makefile

Quoted 4 lines

Changes from V2:
- Removed trailing spaces
- Updated MAINTAINERS & MAKEALL for am3517_evm

[Hiremath, Vaibhav] Denk,

If we do not have any further comments, can we merge these patches?

Thanks,
Vaibhav

Quoted 1,015 lines
---
 MAINTAINERS                           |    4 +
 MAKEALL                               |    1 +
 Makefile                              |    3 +
 arch/arm/include/asm/arch-omap3/mux.h |   38 +++-
 board/logicpd/am3517evm/Makefile      |   46 ++++
 board/logicpd/am3517evm/am3517evm.c   |   76 ++++++
 board/logicpd/am3517evm/am3517evm.h   |  405
+++++++++++++++++++++++++++++++++
 board/logicpd/am3517evm/config.mk     |   30 +++
 include/configs/am3517_evm.h          |  296 ++++++++++++++++++++++++
 9 files changed, 898 insertions(+), 1 deletions(-)
 create mode 100644 board/logicpd/am3517evm/Makefile
 create mode 100644 board/logicpd/am3517evm/am3517evm.c
 create mode 100644 board/logicpd/am3517evm/am3517evm.h
 create mode 100644 board/logicpd/am3517evm/config.mk
 create mode 100644 include/configs/am3517_evm.h
MAINTAINERS +4 -0
index 5cbc845..0bc65e1 100644
@@ -798,6 +798,10 @@ Alex Z
      lart            SA1100
      dnp1110         SA1110
 
+Vaibhav Hiremath <[email protected]>
+
+     am3517_evm      ARM CORTEX-A8 (AM35x SoC)
+
 -------------------------------------------------------------------------
 
 Unknown / orphaned boards:
MAKEALL +1 -0
index bb09627..cd59daa 100755
@@ -641,6 +641,7 @@ LIST_ARM11="                      \
 ## ARM Cortex-A8 Systems
 #########################################################################
 LIST_ARM_CORTEX_A8="         \
+     am3517_evm              \
      devkit8000              \
      mx51evk                 \
      omap3_beagle            \
Makefile +3 -0
index 2d96574..57b3491 100644
@@ -3155,6 +3155,9 @@ SMN42_config    :       unconfig
 ## ARM CORTEX Systems
 #########################################################################
 
+am3517_evm_config :  unconfig
+     @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 am3517evm logicpd omap3
+
 devkit8000_config :  unconfig
      @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 devkit8000 timll omap3
 
arch/arm/include/asm/arch-omap3/mux.h +37 -1
index 0c01c73..ffeb982 100644
@@ -283,7 +283,7 @@
 /*Control and debug */
 #define CONTROL_PADCONF_SYS_32K              0x0A04
 #define CONTROL_PADCONF_SYS_CLKREQ   0x0A06
-#define CONTROL_PADCONF_SYS_NIRQ     0x01E0
+#define CONTROL_PADCONF_SYS_NRESWARM 0x0A08
 #define CONTROL_PADCONF_SYS_BOOT0    0x0A0A
 #define CONTROL_PADCONF_SYS_BOOT1    0x0A0C
 #define CONTROL_PADCONF_SYS_BOOT2    0x0A0E
@@ -337,6 +337,7 @@
 #define CONTROL_PADCONF_ETK_D14_ES2  0x05F8
 #define CONTROL_PADCONF_ETK_D15_ES2  0x05FA
 /*Die to Die */
+#define CONTROL_PADCONF_SYS_NIRQ     0x01E0
 #define CONTROL_PADCONF_D2D_MCAD0    0x01E4
 #define CONTROL_PADCONF_D2D_MCAD1    0x01E6
 #define CONTROL_PADCONF_D2D_MCAD2    0x01E8
@@ -403,6 +404,41 @@
 #define CONTROL_PADCONF_D2D_SBUSFLAG 0x0260
 #define CONTROL_PADCONF_SDRC_CKE0    0x0262
 #define CONTROL_PADCONF_SDRC_CKE1    0x0264
+/* AM3517 specific */
+#define CONTROL_PADCONF_CCDC_PCLK    0x01E4
+#define CONTROL_PADCONF_CCDC_FIELD   0x01E6
+#define CONTROL_PADCONF_CCDC_HD              0x01E8
+#define CONTROL_PADCONF_CCDC_VD              0x01EA
+#define CONTROL_PADCONF_CCDC_WEN     0x01EC
+#define CONTROL_PADCONF_CCDC_DATA0   0x01EE
+#define CONTROL_PADCONF_CCDC_DATA1   0x01F0
+#define CONTROL_PADCONF_CCDC_DATA2   0x01F2
+#define CONTROL_PADCONF_CCDC_DATA3   0x01F4
+#define CONTROL_PADCONF_CCDC_DATA4   0x01F6
+#define CONTROL_PADCONF_CCDC_DATA5   0x01F8
+#define CONTROL_PADCONF_CCDC_DATA6   0x01FA
+#define CONTROL_PADCONF_CCDC_DATA7   0x01FC
+#define CONTROL_PADCONF_RMII_MDIO_DATA       0x01FE
+#define CONTROL_PADCONF_RMII_MDIO_CLK        0x0200
+#define CONTROL_PADCONF_RMII_RXD0    0x0202
+#define CONTROL_PADCONF_RMII_RXD1    0x0204
+#define CONTROL_PADCONF_RMII_CRS_DV  0x0206
+#define CONTROL_PADCONF_RMII_RXER    0x0208
+#define CONTROL_PADCONF_RMII_TXD0    0x020A
+#define CONTROL_PADCONF_RMII_TXD1    0x020C
+#define CONTROL_PADCONF_RMII_TXEN    0x020E
+#define CONTROL_PADCONF_RMII_50MHZ_CLK       0x0210
+#define CONTROL_PADCONF_USB0_DRVBUS  0x0212
+#define CONTROL_PADCONF_HECC1_TXD    0x0214
+#define CONTROL_PADCONF_HECC1_RXD    0x0216
+#define CONTROL_PADCONF_SYS_BOOT7    0x0218
+#define CONTROL_PADCONF_SDRC_DQS0N   0x021A
+#define CONTROL_PADCONF_SDRC_DQS1N   0x021C
+#define CONTROL_PADCONF_SDRC_DQS2N   0x021E
+#define CONTROL_PADCONF_SDRC_DQS3N   0x0220
+#define CONTROL_PADCONF_STRBEN_DLY0  0x0222
+#define CONTROL_PADCONF_STRBEN_DLY1  0x0224
+#define CONTROL_PADCONF_SYS_BOOT8    0x0226
 
 #define MUX_VAL(OFFSET,VALUE)\
      writew((VALUE), OMAP34XX_CTRL_BASE + (OFFSET));
board/logicpd/am3517evm/Makefile new file +46 -0
new file mode 100644
index 0000000..3a6b1a1
@@ -0,0 +1,46 @@
+#
+# Author: Vaibhav Hiremath <[email protected]>
+#
+# Based on ti/evm/Makefile
+#
+# Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
+#
+# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+include $(TOPDIR)/config.mk
+
+LIB  = $(obj)lib$(BOARD).a
+
+COBJS        := am3517evm.o
+
+SRCS := $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+
+$(LIB):      $(obj).depend $(OBJS)
+     $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+     rm -f $(OBJS)
+
+distclean:   clean
+     rm -f $(LIB) core *.bak $(obj).depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
board/logicpd/am3517evm/am3517evm.c new file +76 -0
new file mode 100644
index 0000000..2b912a9
@@ -0,0 +1,76 @@
+/*
+ * am3517evm.c - board file for TI's AM3517 family of devices.
+ *
+ * Author: Vaibhav Hiremath <[email protected]>
+ *
+ * Based on ti/evm/evm.c
+ *
+ * Copyright (C) 2010
+ * Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <common.h>
+#include <asm/io.h>
+#include <asm/arch/mem.h>
+#include <asm/arch/mux.h>
+#include <asm/arch/sys_proto.h>
+#include <asm/mach-types.h>
+#include <i2c.h>
+#include "am3517evm.h"
+
+/*
+ * Routine: board_init
+ * Description: Early hardware init.
+ */
+int board_init(void)
+{
+     DECLARE_GLOBAL_DATA_PTR;
+
+     gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
+     /* board id for Linux */
+     gd->bd->bi_arch_number = MACH_TYPE_OMAP3517EVM;
+     /* boot param addr */
+     gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
+
+     return 0;
+}
+
+/*
+ * Routine: misc_init_r
+ * Description: Init i2c, ethernet, etc... (done here so udelay works)
+ */
+int misc_init_r(void)
+{
+#ifdef CONFIG_DRIVER_OMAP34XX_I2C
+     i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+#endif
+
+     dieid_num_r();
+
+     return 0;
+}
+
+/*
+ * Routine: set_muxconf_regs
+ * Description: Setting up the configuration Mux registers specific to the
+ *           hardware. Many pins need to be moved from protect to primary
+ *           mode.
+ */
+void set_muxconf_regs(void)
+{
+     MUX_AM3517EVM();
+}
board/logicpd/am3517evm/am3517evm.h new file +405 -0
new file mode 100644
index 0000000..68d746c
@@ -0,0 +1,405 @@
+/*
+ * am3517evm.h - Header file for the AM3517 EVM.
+ *
+ * Author: Vaibhav Hiremath <[email protected]>
+ *
+ * Based on ti/evm/evm.h
+ *
+ * Copyright (C) 2010
+ * Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _AM3517EVM_H_
+#define _AM3517EVM_H_
+
+const omap3_sysinfo sysinfo = {
+     DDR_DISCRETE,
+     "AM3517EVM Board",
+     "NAND",
+};
+
+/*
+ * IEN  - Input Enable
+ * IDIS - Input Disable
+ * PTD  - Pull type Down
+ * PTU  - Pull type Up
+ * DIS  - Pull type selection is inactive
+ * EN   - Pull type selection is active
+ * M0   - Mode 0
+ * The commented string gives the final mux configuration for that pin
+ */
+#define MUX_AM3517EVM() \
+     /* SDRC */\
+     MUX_VAL(CP(SDRC_D0),            (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D1),            (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D2),            (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D3),            (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D4),            (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D5),            (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D6),            (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D7),            (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D8),            (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D9),            (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D10),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D11),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D12),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D13),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D14),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D15),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D16),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D17),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D18),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D19),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D20),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D21),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D22),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D23),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D24),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D25),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D26),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D27),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D28),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D29),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D30),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_D31),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_CLK),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_DQS0),          (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_DQS1),          (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_DQS2),          (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_DQS3),          (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SDRC_DQS0N),         (IEN  | PTD | EN  | M0)) \
+     MUX_VAL(CP(SDRC_DQS1N),         (IEN  | PTD | EN  | M0)) \
+     MUX_VAL(CP(SDRC_DQS2N),         (IEN  | PTD | EN  | M0)) \
+     MUX_VAL(CP(SDRC_DQS3N),         (IEN  | PTD | EN  | M0)) \
+     MUX_VAL(CP(SDRC_CKE0),          (M0)) \
+     MUX_VAL(CP(SDRC_CKE1),          (M0)) \
+     /*sdrc_strben_dly0*/\
+     MUX_VAL(CP(STRBEN_DLY0),        (IEN  | PTD | EN  | M0)) \
+      /*sdrc_strben_dly1*/\
+     MUX_VAL(CP(STRBEN_DLY1),        (IEN  | PTD | EN  | M0)) \
+     /* GPMC */\
+     MUX_VAL(CP(GPMC_A1),            (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_A2),            (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_A3),            (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_A4),            (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_A5),            (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_A6),            (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_A7),            (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_A8),            (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_A9),            (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_A10),           (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_D0),            (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_D1),            (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_D2),            (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_D3),            (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_D4),            (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_D5),            (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_D6),            (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_D7),            (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_D8),            (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_D9),            (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_D10),           (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_D11),           (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_D12),           (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_D13),           (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_D14),           (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_D15),           (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_NCS0),          (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_NCS1),          (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_NCS2),          (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_NCS3),          (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_NCS4),          (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_NCS5),          (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_NCS6),          (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(GPMC_NCS7),          (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_CLK),           (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_NADV_ALE),      (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(GPMC_NOE),           (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(GPMC_NWE),           (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(GPMC_NBE0_CLE),      (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_NBE1),          (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_NWP),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(GPMC_WAIT0),         (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_WAIT1),         (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(GPMC_WAIT2),         (IEN  | PTU | EN  | M4)) /*GPIO_64*/\
+                                                      /* - ETH_nRESET*/\
+     MUX_VAL(CP(GPMC_WAIT3),         (IEN  | PTU | EN  | M0)) \
+     /* DSS */\
+     MUX_VAL(CP(DSS_PCLK),           (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_HSYNC),          (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_VSYNC),          (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_ACBIAS),         (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA0),          (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA1),          (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA2),          (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA3),          (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA4),          (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA5),          (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA6),          (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA7),          (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA8),          (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA9),          (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA10),         (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA11),         (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA12),         (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA13),         (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA14),         (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA15),         (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA16),         (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA17),         (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA18),         (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA19),         (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA20),         (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA21),         (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA22),         (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(DSS_DATA23),         (IDIS | PTD | DIS | M0)) \
+     /* CAMERA */\
+     MUX_VAL(CP(CAM_HS),             (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(CAM_VS),             (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(CAM_XCLKA),          (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(CAM_PCLK),           (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(CAM_FLD),            (IDIS | PTD | DIS | M4)) /*GPIO_98*/\
+                                                      /* - CAM_RESET*/\
+     MUX_VAL(CP(CAM_D0),             (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CAM_D1),             (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CAM_D2),             (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CAM_D3),             (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CAM_D4),             (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CAM_D5),             (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CAM_D6),             (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CAM_D7),             (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CAM_D8),             (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CAM_D9),             (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CAM_D10),            (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CAM_D11),            (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CAM_XCLKB),          (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(CAM_WEN),            (IEN  | PTD | DIS | M4)) /*GPIO_167*/\
+     MUX_VAL(CP(CAM_STROBE),         (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(CSI2_DX0),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CSI2_DY0),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CSI2_DX1),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CSI2_DY1),           (IEN  | PTD | DIS | M0)) \
+     /* MMC */\
+     MUX_VAL(CP(MMC1_CLK),           (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(MMC1_CMD),           (IEN  | PTU | DIS | M0)) \
+     MUX_VAL(CP(MMC1_DAT0),          (IEN  | PTU | DIS | M0)) \
+     MUX_VAL(CP(MMC1_DAT1),          (IEN  | PTU | DIS | M0)) \
+     MUX_VAL(CP(MMC1_DAT2),          (IEN  | PTU | DIS | M0)) \
+     MUX_VAL(CP(MMC1_DAT3),          (IEN  | PTU | DIS | M0)) \
+     /* WriteProtect */\
+     MUX_VAL(CP(MMC1_DAT4),          (IEN  | PTU | EN  | M4)) \
+     MUX_VAL(CP(MMC1_DAT5),          (IEN  | PTU | EN  | M4)) /*CardDetect*/\
+     MUX_VAL(CP(MMC1_DAT6),          (IEN  | PTU | EN  | M4)) \
+     MUX_VAL(CP(MMC1_DAT7),          (IEN  | PTU | EN  | M4)) \
+     \
+     MUX_VAL(CP(MMC2_CLK),           (IEN  | PTD | EN  | M0)) \
+     MUX_VAL(CP(MMC2_CMD),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(MMC2_DAT0),          (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(MMC2_DAT1),          (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(MMC2_DAT2),          (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(MMC2_DAT3),          (IEN  | PTD | DIS | M0)) \
+     /* McBSP */\
+     MUX_VAL(CP(MCBSP_CLKS),         (IEN  | PTU | DIS | M0)) \
+     MUX_VAL(CP(MCBSP1_CLKR),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(MCBSP1_FSR),         (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(MCBSP1_DX),          (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(MCBSP1_DR),          (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(MCBSP1_FSX),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(MCBSP1_CLKX),        (IEN  | PTD | DIS | M0)) \
+     \
+     MUX_VAL(CP(MCBSP2_FSX),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(MCBSP2_CLKX),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(MCBSP2_DR),          (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(MCBSP2_DX),          (IDIS | PTD | DIS | M0)) \
+     \
+     MUX_VAL(CP(MCBSP3_DX),          (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(MCBSP3_DR),          (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(MCBSP3_CLKX),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(MCBSP3_FSX),         (IEN  | PTD | DIS | M0)) \
+     \
+     MUX_VAL(CP(MCBSP4_CLKX),        (IDIS | PTD | DIS | M4)) /*GPIO_152*/\
+                                                      /* - LCD_INI*/\
+     MUX_VAL(CP(MCBSP4_DR),          (IDIS | PTD | DIS | M4)) /*GPIO_153*/\
+                                                      /* - LCD_ENVDD */\
+     MUX_VAL(CP(MCBSP4_DX),          (IDIS | PTD | DIS | M4)) /*GPIO_154*/\
+                                                      /* - LCD_QVGA/nVGA */\
+     MUX_VAL(CP(MCBSP4_FSX),         (IDIS | PTD | DIS | M4)) /*GPIO_155*/\
+                                                      /* - LCD_RESB */\
+     /* UART */\
+     MUX_VAL(CP(UART1_TX),           (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(UART1_RTS),          (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(UART1_CTS),          (IEN  | PTU | DIS | M0)) \
+     \
+     MUX_VAL(CP(UART1_RX),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(UART2_CTS),          (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(UART2_RTS),          (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(UART2_TX),           (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(UART2_RX),           (IEN  | PTD | DIS | M0)) \
+     \
+     MUX_VAL(CP(UART3_CTS_RCTX),     (IEN  | PTU | DIS | M0)) \
+     MUX_VAL(CP(UART3_RTS_SD),       (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(UART3_RX_IRRX),      (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(UART3_TX_IRTX),      (IDIS | PTD | DIS | M0)) \
+     /* I2C */\
+     MUX_VAL(CP(I2C1_SCL),           (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(I2C1_SDA),           (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(I2C2_SCL),           (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(I2C2_SDA),           (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(I2C3_SCL),           (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(I2C3_SDA),           (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(I2C4_SCL),           (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(I2C4_SDA),           (IEN  | PTU | EN  | M0)) \
+     /* McSPI */\
+     MUX_VAL(CP(MCSPI1_CLK),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(MCSPI1_SIMO),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(MCSPI1_SOMI),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(MCSPI1_CS0),         (IEN  | PTD | EN  | M0)) \
+     MUX_VAL(CP(MCSPI1_CS1),         (IEN  | PTD | EN  | M4)) /*GPIO_175*/\
+     MUX_VAL(CP(MCSPI1_CS2),         (IEN  | PTU | DIS | M4)) /*GPIO_176*/\
+                                                      /* - LAN_INTR*/\
+     MUX_VAL(CP(MCSPI1_CS3),         (IEN  | PTD | EN  | M0)) \
+     \
+     MUX_VAL(CP(MCSPI2_CLK),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(MCSPI2_SIMO),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(MCSPI2_SOMI),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(MCSPI2_CS0),         (IEN  | PTD | EN  | M4)) \
+     MUX_VAL(CP(MCSPI2_CS1),         (IEN  | PTD | EN  | M4)) \
+     /* CCDC */\
+     MUX_VAL(CP(CCDC_PCLK),          (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(CCDC_FIELD),         (IEN  | PTD | DIS | M1)) \
+     MUX_VAL(CP(CCDC_HD),            (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(CCDC_VD),            (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(CCDC_WEN),           (IEN  | PTD | DIS | M1)) \
+     MUX_VAL(CP(CCDC_DATA0),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CCDC_DATA1),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CCDC_DATA2),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CCDC_DATA3),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CCDC_DATA4),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CCDC_DATA5),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CCDC_DATA6),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(CCDC_DATA7),         (IEN  | PTD | DIS | M0)) \
+     /* RMII */\
+     MUX_VAL(CP(RMII_MDIO_DATA),     (IEN  |  M0)) \
+     MUX_VAL(CP(RMII_MDIO_CLK),      (M0)) \
+     MUX_VAL(CP(RMII_RXD0)   ,       (IEN  | PTD | M0)) \
+     MUX_VAL(CP(RMII_RXD1),          (IEN  | PTD | M0)) \
+     MUX_VAL(CP(RMII_CRS_DV),        (IEN  | PTD | M0)) \
+     MUX_VAL(CP(RMII_RXER),          (PTD | M0)) \
+     MUX_VAL(CP(RMII_TXD0),          (PTD | M0)) \
+     MUX_VAL(CP(RMII_TXD1),          (PTD | M0)) \
+     MUX_VAL(CP(RMII_TXEN),          (PTD | M0)) \
+     MUX_VAL(CP(RMII_50MHZ_CLK),     (IEN  | PTD | EN  | M0)) \
+     /* HECC */\
+     MUX_VAL(CP(HECC1_TXD),          (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(HECC1_RXD),          (IEN  | PTU | EN  | M0)) \
+     /* HSUSB */\
+     MUX_VAL(CP(HSUSB0_CLK),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(HSUSB0_STP),         (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(HSUSB0_DIR),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(HSUSB0_NXT),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(HSUSB0_DATA0),       (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(HSUSB0_DATA1),       (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(HSUSB0_DATA2),       (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(HSUSB0_DATA3),       (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(HSUSB0_DATA4),       (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(HSUSB0_DATA5),       (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(HSUSB0_DATA6),       (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(HSUSB0_DATA7),       (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(USB0_DRVBUS),        (IEN  | PTD | EN  | M0)) \
+     /* HDQ */\
+     MUX_VAL(CP(HDQ_SIO),            (IEN  | PTU | EN  | M0)) \
+     /* Control and debug */\
+     MUX_VAL(CP(SYS_32K),            (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SYS_CLKREQ),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SYS_NIRQ),           (IEN  | PTU | EN  | M0)) \
+     /*SYS_nRESWARM */\
+     MUX_VAL(CP(SYS_NRESWARM),       (IDIS | PTU | DIS | M4)) \
+                                                     /* - GPIO30 */\
+     MUX_VAL(CP(SYS_BOOT0),          (IEN  | PTD | DIS | M4)) /*GPIO_2*/\
+                                                      /* - PEN_IRQ */\
+     MUX_VAL(CP(SYS_BOOT1),          (IEN  | PTD | DIS | M4)) /*GPIO_3 */\
+     MUX_VAL(CP(SYS_BOOT2),          (IEN  | PTD | DIS | M4)) /*GPIO_4*/\
+     MUX_VAL(CP(SYS_BOOT3),          (IEN  | PTD | DIS | M4)) /*GPIO_5*/\
+     MUX_VAL(CP(SYS_BOOT4),          (IEN  | PTD | DIS | M4)) /*GPIO_6*/\
+     MUX_VAL(CP(SYS_BOOT5),          (IEN  | PTD | DIS | M4)) /*GPIO_7*/\
+     MUX_VAL(CP(SYS_BOOT6),          (IDIS | PTD | DIS | M4)) /*GPIO_8*/\
+                                                      /* - VIO_1V8*/\
+     MUX_VAL(CP(SYS_BOOT7),          (IEN  | PTD | EN  | M0)) \
+     MUX_VAL(CP(SYS_BOOT8),          (IEN  | PTD | EN  | M0)) \
+     \
+     MUX_VAL(CP(SYS_OFF_MODE),       (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SYS_CLKOUT1),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(SYS_CLKOUT2),        (IEN  | PTU | EN  | M0)) \
+     /* JTAG */\
+     MUX_VAL(CP(JTAG_nTRST),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(JTAG_TCK),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(JTAG_TMS),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(JTAG_TDI),           (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(JTAG_EMU0),          (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(JTAG_EMU1),          (IEN  | PTD | DIS | M0)) \
+     /* ETK (ES2 onwards) */\
+     MUX_VAL(CP(ETK_CLK_ES2),        (IDIS | PTU | EN  | M0)) \
+     MUX_VAL(CP(ETK_CTL_ES2),        (IDIS | PTD | DIS | M0)) \
+     MUX_VAL(CP(ETK_D0_ES2),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(ETK_D1_ES2),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(ETK_D2_ES2),         (IEN  | PTD | EN  | M0)) \
+     MUX_VAL(CP(ETK_D3_ES2),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(ETK_D4_ES2),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(ETK_D5_ES2),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(ETK_D6_ES2),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(ETK_D7_ES2),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(ETK_D8_ES2),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(ETK_D9_ES2),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(ETK_D10_ES2),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(ETK_D11_ES2),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(ETK_D12_ES2),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(ETK_D13_ES2),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(ETK_D14_ES2),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(ETK_D15_ES2),        (IEN  | PTD | DIS | M0)) \
+     /* Die to Die */\
+     MUX_VAL(CP(D2D_MCAD34),         (IEN  | PTD | EN  | M0)) \
+     MUX_VAL(CP(D2D_MCAD35),         (IEN  | PTD | EN  | M0)) \
+     MUX_VAL(CP(D2D_MCAD36),         (IEN  | PTD | EN  | M0)) \
+     MUX_VAL(CP(D2D_CLK26MI),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_NRESPWRON),      (IEN  | PTD | EN  | M0)) \
+     MUX_VAL(CP(D2D_NRESWARM),       (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(D2D_ARM9NIRQ),       (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_UMA2P6FIQ),      (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_SPINT),          (IEN  | PTD | EN  | M0)) \
+     MUX_VAL(CP(D2D_FRINT),          (IEN  | PTD | EN  | M0)) \
+     MUX_VAL(CP(D2D_DMAREQ0),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_DMAREQ1),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_DMAREQ2),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_DMAREQ3),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_N3GTRST),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_N3GTDI),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_N3GTDO),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_N3GTMS),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_N3GTCK),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_N3GRTCK),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_MSTDBY),         (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(D2D_SWAKEUP),        (IEN  | PTD | EN  | M0)) \
+     MUX_VAL(CP(D2D_IDLEREQ),        (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_IDLEACK),        (IEN  | PTU | EN  | M0)) \
+     MUX_VAL(CP(D2D_MWRITE),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_SWRITE),         (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_MREAD),          (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_SREAD),          (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_MBUSFLAG),       (IEN  | PTD | DIS | M0)) \
+     MUX_VAL(CP(D2D_SBUSFLAG),       (IEN  | PTD | DIS | M0)) \
+
+#endif
board/logicpd/am3517evm/config.mk new file +30 -0
new file mode 100644
index 0000000..f7a35ce
@@ -0,0 +1,30 @@
+#
+# Author: Vaibhav Hiremath <[email protected]>
+#
+# Based on ti/evm/config.mk
+#
+# Copyright (C) 2010
+# Texas Instruments Incorporated - http://www.ti.com/
+#
+# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# Physical Address:
+# 8000'0000 (bank0)
+# A000/0000 (bank1)
+# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000
+# (mem base + reserved)
+
+# For use with external or internal boots.
+TEXT_BASE = 0x80e80000
include/configs/am3517_evm.h new file +257 -0
new file mode 100644
index 0000000..63f853a
@@ -0,0 +1,296 @@
+/*
+ * am3517_evm.h - Default configuration for AM3517 EVM board.
+ *
+ * Author: Vaibhav Hiremath <[email protected]>
+ *
+ * Based on omap3_evm_config.h
+ *
+ * Copyright (C) 2009 Texas Instruments Incorporated
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/*
+ * High Level Configuration Options
+ */
+#define CONFIG_ARMCORTEXA8   1       /* This is an ARM V7 CPU core */
+#define CONFIG_OMAP          1       /* in a TI OMAP core */
+#define CONFIG_OMAP34XX              1       /* which is a 34XX */
+#define CONFIG_OMAP3_AM3517EVM       1       /* working with AM3517EVM */
+
+#define CONFIG_EMIF4         1       /* The chip has EMIF4 controller */
+
+#include <asm/arch/cpu.h>            /* get chip and board defs */
+#include <asm/arch/omap3.h>
+
+/*
+ * Display CPU and Board information
+ */
+#define CONFIG_DISPLAY_CPUINFO               1
+#define CONFIG_DISPLAY_BOARDINFO     1
+
+/* Clock Defines */
+#define V_OSCK                       26000000        /* Clock output from T2 */
+#define V_SCLK                       (V_OSCK >> 1)
+
+#undef CONFIG_USE_IRQ                                /* no support for IRQs */
+#define CONFIG_MISC_INIT_R
+
+#define CONFIG_CMDLINE_TAG           1       /* enable passing of ATAGs */
+#define CONFIG_SETUP_MEMORY_TAGS     1
+#define CONFIG_INITRD_TAG            1
+#define CONFIG_REVISION_TAG          1
+
+/*
+ * Size of malloc() pool
+ */
+#define CONFIG_ENV_SIZE                      (128 << 10)     /* 128 KiB sector */
+#define CONFIG_SYS_MALLOC_LEN                (CONFIG_ENV_SIZE + (128 << 10))
+#define CONFIG_SYS_GBL_DATA_SIZE     128     /* bytes reserved for */
+                                             /* initial data */
+/*
+ * DDR related
+ */
+#define CONFIG_OMAP3_MICRON_DDR              1       /* Micron DDR */
+#define CONFIG_SYS_CS0_SIZE          (256 * 1024 * 1024)
+
+/*
+ * Hardware drivers
+ */
+
+/*
+ * NS16550 Configuration
+ */
+#define V_NS16550_CLK                        48000000        /* 48MHz (APLL96/2) */
+
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE  (-4)
+#define CONFIG_SYS_NS16550_CLK               V_NS16550_CLK
+
+/*
+ * select serial console configuration
+ */
+#define CONFIG_CONS_INDEX            3
+#define CONFIG_SYS_NS16550_COM3              OMAP34XX_UART3
+#define CONFIG_SERIAL3                       3       /* UART3 on AM3517 EVM */
+
+/* allow to overwrite serial and ethaddr */
+#define CONFIG_ENV_OVERWRITE
+#define CONFIG_BAUDRATE                      115200
+#define CONFIG_SYS_BAUDRATE_TABLE    {4800, 9600, 19200, 38400, 57600,\
+                                     115200}
+#define CONFIG_MMC                   1
+#define CONFIG_OMAP3_MMC             1
+#define CONFIG_DOS_PARTITION         1
+
+/* commands to include */
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_EXT2              /* EXT2 Support                 */
+#define CONFIG_CMD_FAT               /* FAT support                  */
+#define CONFIG_CMD_JFFS2     /* JFFS2 Support                */
+
+#define CONFIG_CMD_I2C               /* I2C serial bus support       */
+#define CONFIG_CMD_MMC               /* MMC support                  */
+#define CONFIG_CMD_NAND              /* NAND support                 */
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_PING
+
+#undef CONFIG_CMD_FLASH              /* flinfo, erase, protect       */
+#undef CONFIG_CMD_FPGA               /* FPGA configuration Support   */
+#undef CONFIG_CMD_IMI                /* iminfo                       */
+#undef CONFIG_CMD_IMLS               /* List all found images        */
+
+#define CONFIG_SYS_NO_FLASH
+#define CONFIG_HARD_I2C                      1
+#define CONFIG_SYS_I2C_SPEED         100000
+#define CONFIG_SYS_I2C_SLAVE         1
+#define CONFIG_SYS_I2C_BUS           0
+#define CONFIG_SYS_I2C_BUS_SELECT    1
+#define CONFIG_DRIVER_OMAP34XX_I2C   1
+
+#undef CONFIG_CMD_NET
+/*
+ * Board NAND Info.
+ */
+#define CONFIG_SYS_NAND_ADDR         NAND_BASE       /* physical address */
+                                                     /* to access nand */
+#define CONFIG_SYS_NAND_BASE         NAND_BASE       /* physical address */
+                                                     /* to access */
+                                                     /* nand at CS0 */
+
+#define CONFIG_SYS_MAX_NAND_DEVICE   1               /* Max number of */
+                                                     /* NAND devices */
+#define CONFIG_SYS_64BIT_VSPRINTF            /* needed for nand_util.c */
+
+#define CONFIG_JFFS2_NAND
+/* nand device jffs2 lives on */
+#define CONFIG_JFFS2_DEV             "nand0"
+/* start of jffs2 partition */
+#define CONFIG_JFFS2_PART_OFFSET     0x680000
+#define CONFIG_JFFS2_PART_SIZE               0xf980000       /* sz of jffs2 part */
+
+/* Environment information */
+#define CONFIG_BOOTDELAY     10
+
+#define CONFIG_BOOTFILE              uImage
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+     "loadaddr=0x82000000\0" \
+     "console=ttyS2,115200n8\0" \
+     "mmcargs=setenv bootargs console=${console} " \
+             "root=/dev/mmcblk0p2 rw " \
+             "rootfstype=ext3 rootwait\0" \
+     "nandargs=setenv bootargs console=${console} " \
+             "root=/dev/mtdblock4 rw " \
+             "rootfstype=jffs2\0" \
+     "loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
+     "bootscript=echo Running bootscript from mmc ...; " \
+             "source ${loadaddr}\0" \
+     "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
+     "mmcboot=echo Booting from mmc ...; " \
+             "run mmcargs; " \
+             "bootm ${loadaddr}\0" \
+     "nandboot=echo Booting from nand ...; " \
+             "run nandargs; " \
+             "nand read ${loadaddr} 280000 400000; " \
+             "bootm ${loadaddr}\0" \
+
+#define CONFIG_BOOTCOMMAND \
+     "if mmc init; then " \
+             "if run loadbootscript; then " \
+                     "run bootscript; " \
+             "else " \
+                     "if run loaduimage; then " \
+                             "run mmcboot; " \
+                     "else run nandboot; " \
+                     "fi; " \
+             "fi; " \
+     "else run nandboot; fi"
+
+#define CONFIG_AUTO_COMPLETE 1
+/*
+ * Miscellaneous configurable options
+ */
+#define V_PROMPT                     "AM3517_EVM # "
+
+#define CONFIG_SYS_LONGHELP          /* undef to save memory */
+#define CONFIG_SYS_HUSH_PARSER               /* use "hush" command parser */
+#define CONFIG_SYS_PROMPT_HUSH_PS2   "> "
+#define CONFIG_SYS_PROMPT            V_PROMPT
+#define CONFIG_SYS_CBSIZE            512     /* Console I/O Buffer Size */
+/* Print Buffer Size */
+#define CONFIG_SYS_PBSIZE            (CONFIG_SYS_CBSIZE + \
+                                     sizeof(CONFIG_SYS_PROMPT) + 16)
+#define CONFIG_SYS_MAXARGS           32      /* max number of command */
+                                             /* args */
+/* Boot Argument Buffer Size */
+#define CONFIG_SYS_BARGSIZE          (CONFIG_SYS_CBSIZE)
+/* memtest works on */
+#define CONFIG_SYS_MEMTEST_START     (OMAP34XX_SDRC_CS0)
+#define CONFIG_SYS_MEMTEST_END               (OMAP34XX_SDRC_CS0 + \
+                                     0x01F00000) /* 31MB */
+
+#define CONFIG_SYS_LOAD_ADDR         (OMAP34XX_SDRC_CS0) /* default load */
+                                                             /* address */
+
+/*
+ * AM3517 has 12 GP timers, they can be driven by the system clock
+ * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
+ * This rate is divided by a local divisor.
+ */
+#define CONFIG_SYS_TIMERBASE         OMAP34XX_GPT2
+#define CONFIG_SYS_PTV                       2       /* Divisor: 2^(PTV+1) => 8 */
+#define CONFIG_SYS_HZ                        1000
+
+/*-----------------------------------------------------------------------
+ * Stack sizes
+ *
+ * The stack sizes are set up in start.S using the settings below
+ */
+#define CONFIG_STACKSIZE     (128 << 10)     /* regular stack 128 KiB */
+#ifdef CONFIG_USE_IRQ
+#define CONFIG_STACKSIZE_IRQ (4 << 10)       /* IRQ stack 4 KiB */
+#define CONFIG_STACKSIZE_FIQ (4 << 10)       /* FIQ stack 4 KiB */
+#endif
+
+/*-----------------------------------------------------------------------
+ * Physical Memory Map
+ */
+#define CONFIG_NR_DRAM_BANKS 2       /* CS1 may or may not be populated */
+#define PHYS_SDRAM_1         OMAP34XX_SDRC_CS0
+#define PHYS_SDRAM_1_SIZE    (32 << 20)      /*@least 32 MiB */
+#define PHYS_SDRAM_2         OMAP34XX_SDRC_CS1
+
+/* SDRAM Bank Allocation method */
+#define SDRC_R_B_C           1
+
+/*-----------------------------------------------------------------------
+ * FLASH and environment organization
+ */
+
+/* **** PISMO SUPPORT *** */
+
+/* Configure the PISMO */
+#define PISMO1_NAND_SIZE             GPMC_SIZE_128M
+#define PISMO1_ONEN_SIZE             GPMC_SIZE_128M
+
+#define CONFIG_SYS_MAX_FLASH_SECT    520     /* max number of sectors */
+                                             /* on one chip */
+#define CONFIG_SYS_MAX_FLASH_BANKS   2       /* max number of flash banks */
+#define CONFIG_SYS_MONITOR_LEN               (256 << 10)     /* Reserve 2 sectors

*/

include/configs/am3517_evm.h new file +39 -1
+
+#define CONFIG_SYS_FLASH_BASE                boot_flash_base
+
+/* Monitor at start of flash */
+#define CONFIG_SYS_MONITOR_BASE              CONFIG_SYS_FLASH_BASE
+
+#define CONFIG_NAND_OMAP_GPMC
+#define GPMC_NAND_ECC_LP_x16_LAYOUT  1
+#define CONFIG_ENV_IS_IN_NAND                1
+#define SMNAND_ENV_OFFSET            0x260000 /* environment starts here */
+
+#define CONFIG_SYS_ENV_SECT_SIZE     boot_flash_sec
+#define CONFIG_ENV_OFFSET            boot_flash_off
+#define CONFIG_ENV_ADDR                      boot_flash_env_addr
+
+/*-----------------------------------------------------------------------
+ * CFI FLASH driver setup
+ */
+/* timeout values are in ticks */
+#define CONFIG_SYS_FLASH_ERASE_TOUT  (100 * CONFIG_SYS_HZ)
+#define CONFIG_SYS_FLASH_WRITE_TOUT  (100 * CONFIG_SYS_HZ)
+
+/* Flash banks JFFS2 should use */
+#define CONFIG_SYS_MAX_MTD_BANKS     (CONFIG_SYS_MAX_FLASH_BANKS + \
+                                     CONFIG_SYS_MAX_NAND_DEVICE)
+#define CONFIG_SYS_JFFS2_MEM_NAND
+/* use flash_info[2] */
+#define CONFIG_SYS_JFFS2_FIRST_BANK  CONFIG_SYS_MAX_FLASH_BANKS
+#define CONFIG_SYS_JFFS2_NUM_BANKS   1
+
+#ifndef __ASSEMBLY__
+extern unsigned int boot_flash_base;
+extern volatile unsigned int boot_flash_env_addr;
+extern unsigned int boot_flash_off;
+extern unsigned int boot_flash_sec;
+extern unsigned int boot_flash_type;
+#endif
+
+#endif /* __CONFIG_H */
--

1.6.2.4

#117 lore raw

PATCH v3 1/2 AM35x: Add support for AM3517EVM

In reply to hvaibhav at ti.com

Dear hvaibhav at ti.com,

Quoted 11 lines · In message <[email protected]> you wrote:

From: Vaibhav Hiremath <[email protected]>

This patch adds basic support for the AM3517EVM.
It includes:
- Board int file (.c and .h)
- Default configuration file
- Updates for Makefile

Changes from V2:
- Removed trailing spaces
- Updated MAINTAINERS & MAKEALL for am3517_evm

Such comments do not belong into the commit message. Please place thes ebelow the "---" line:

Quoted 3 lines

---

==> Comments should go here.

MAINTAINERS Alex Z · line 804

Quoted 12 lines
MAINTAINERS +4 -0
index 5cbc845..0bc65e1 100644
@@ -798,6 +798,10 @@ Alex Z
 	lart		SA1100
 	dnp1110		SA1110
 
+Vaibhav Hiremath <[email protected]>
+
+	am3517_evm	ARM CORTEX-A8 (AM35x SoC)
+

Please keep list sorted.

...

Quoted 4 lines
arch/arm/include/asm/arch-omap3/mux.h +0 -0
index 0c01c73..ffeb982 100644

...

arch/arm/include/asm/arch-omap3/mux.h line 409

Quoted 3 lines
arch/arm/include/asm/arch-omap3/mux.h +3 -0
+/* AM3517 specific */
+#define CONTROL_PADCONF_CCDC_PCLK	0x01E4
+#define CONTROL_PADCONF_CCDC_FIELD	0x01E6

Board specific defoinitions should not be added to global header files. Please use a board specific header instead.

Quoted 3 lines
board/logicpd/am3517evm/am3517evm.c new file +0 -0
@@ -0,0 +1,76 @@

...

board/logicpd/am3517evm/am3517evm.c line 41

Quoted 3 lines
board/logicpd/am3517evm/am3517evm.c new file +3 -0
+int board_init(void)
+{
+	DECLARE_GLOBAL_DATA_PTR;

This is bound to break. DECLARE_GLOBAL_DATA_PTR must always be used on file scope only; never use this on function scope. Please check all your code.

Best regards,

Wolfgang Denk

Signature · 6 lines
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: wd at denx.de
Genius doesn't work on an assembly line basis.  You can't simply say,
"Today I will be brilliant."
	-- Kirk, "The Ultimate Computer", stardate 4731.3
#118 lore raw

PATCH v3 1/2 AM35x: Add support for AM3517EVM

Quoted 20 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Monday, May 31, 2010 3:11 PM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de; tom at bumblecow.com; Paulraj, Sandeep; Premi, Sanjeev
Subject: Re: [PATCH-V3 1/2] AM35x: Add support for AM3517EVM

Dear hvaibhav at ti.com,

Quoted 8 lines · In message <[email protected]> you wrote:

From: Vaibhav Hiremath <[email protected]>

This patch adds basic support for the AM3517EVM.
It includes:
- Board int file (.c and .h)
- Default configuration file
- Updates for Makefile

Quoted 7 lines
Quoted 3 lines

Changes from V2:
- Removed trailing spaces
- Updated MAINTAINERS & MAKEALL for am3517_evm

Such comments do not belong into the commit message. Please place thes ebelow the "---" line:

[Hiremath, Vaibhav] Ok will incorporate in next post.

Quoted 14 lines
Quoted 3 lines

---

==> Comments should go here.

Quoted 8 lines
MAINTAINERS +0 -0
index 5cbc845..0bc65e1 100644
@@ -798,6 +798,10 @@ Alex Z
 	lart		SA1100
 	dnp1110		SA1110
 
Quoted 7 lines

MAINTAINERS Alex Z · line 804

Quoted 4 lines
MAINTAINERS +4 -0
+Vaibhav Hiremath <[email protected]>
+
+	am3517_evm	ARM CORTEX-A8 (AM35x SoC)
+

Please keep list sorted.

[Hiremath, Vaibhav] How does this sorted, I could not see any relation between the entries there.

Quoted 7 lines

...

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/include/asm/arch-omap3/mux.h

Quoted 3 lines

index 0c01c73..ffeb982 100644

arch/arm/include/asm/arch-omap3/mux.h +0 -0

...

Quoted 7 lines

arch/arm/include/asm/arch-omap3/mux.h line 409

Quoted 3 lines
arch/arm/include/asm/arch-omap3/mux.h +3 -0
+/* AM3517 specific */
+#define CONTROL_PADCONF_CCDC_PCLK	0x01E4
+#define CONTROL_PADCONF_CCDC_FIELD	0x01E6

Board specific defoinitions should not be added to global header files. Please use a board specific header instead.

[Hiremath, Vaibhav] I think this has been placed at the right place. This is mux definition and got added to mux.h file. You could see all mux definition are present in this file.

Do you see any issues with this?

Quoted 10 lines
Quoted 3 lines
board/logicpd/am3517evm/am3517evm.c new file +0 -0
@@ -0,0 +1,76 @@

...

board/logicpd/am3517evm/am3517evm.c line 41

Quoted 3 lines
board/logicpd/am3517evm/am3517evm.c new file +3 -0
+int board_init(void)
+{
+	DECLARE_GLOBAL_DATA_PTR;

This is bound to break. DECLARE_GLOBAL_DATA_PTR must always be used on file scope only; never use this on function scope.

[Hiremath, Vaibhav] Agreed. Actually this code is derived form board/ti/evm/, so followed the same here.

I will change it in next post.

Quoted 3 lines

Please check all
your code.

[Hiremath, Vaibhav] Do you see any other issues? I don't get this statement.

Thanks,
Vaibhav

Quoted 12 lines

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: wd at denx.de Genius doesn't work on an assembly line basis. You can't simply say, "Today I will be brilliant."
-- Kirk, "The Ultimate Computer", stardate 4731.3

#119 lore raw

PATCH v3 1/2 AM35x: Add support for AM3517EVM

In reply to Wolfgang Denk
Quoted 9 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Thursday, June 03, 2010 10:57 PM
To: 'Wolfgang Denk'
Cc: u-boot at lists.denx.de; tom at bumblecow.com; Paulraj, Sandeep; Premi, Sanjeev
Subject: RE: [PATCH-V3 1/2] AM35x: Add support for AM3517EVM

[Hiremath, Vaibhav] Denk,

Can you please reply to below queries of mine, so that I can incorporate the changes and submit it again?

Thanks,
Vaibhav

Quoted 50 lines
Quoted 20 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Monday, May 31, 2010 3:11 PM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de; tom at bumblecow.com; Paulraj, Sandeep; Premi, Sanjeev
Subject: Re: [PATCH-V3 1/2] AM35x: Add support for AM3517EVM

Dear hvaibhav at ti.com,

Quoted 8 lines · In message <[email protected]> you wrote:

From: Vaibhav Hiremath <[email protected]>

This patch adds basic support for the AM3517EVM.
It includes:
- Board int file (.c and .h)
- Default configuration file
- Updates for Makefile

Quoted 7 lines
Quoted 3 lines

Changes from V2:
- Removed trailing spaces
- Updated MAINTAINERS & MAKEALL for am3517_evm

Such comments do not belong into the commit message. Please place thes ebelow the "---" line:

[Hiremath, Vaibhav] Ok will incorporate in next post.

Quoted 14 lines
Quoted 3 lines

---

==> Comments should go here.

Quoted 8 lines
MAINTAINERS +0 -0
index 5cbc845..0bc65e1 100644
@@ -798,6 +798,10 @@ Alex Z
 	lart		SA1100
 	dnp1110		SA1110
 
Quoted 7 lines

MAINTAINERS Alex Z · line 804

Quoted 4 lines
MAINTAINERS +4 -0
+Vaibhav Hiremath <[email protected]>
+
+	am3517_evm	ARM CORTEX-A8 (AM35x SoC)
+

Please keep list sorted.

Quoted 3 lines

[Hiremath, Vaibhav] How does this sorted, I could not see any relation between the entries there.

[Hiremath, Vaibhav] Denk,

Quoted 55 lines
Quoted 7 lines

...

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/include/asm/arch-omap3/mux.h

Quoted 3 lines

index 0c01c73..ffeb982 100644

arch/arm/include/asm/arch-omap3/mux.h +0 -0

...

Quoted 7 lines

arch/arm/include/asm/arch-omap3/mux.h line 409

Quoted 3 lines
arch/arm/include/asm/arch-omap3/mux.h +3 -0
+/* AM3517 specific */
+#define CONTROL_PADCONF_CCDC_PCLK	0x01E4
+#define CONTROL_PADCONF_CCDC_FIELD	0x01E6

Board specific defoinitions should not be added to global header files. Please use a board specific header instead.

[Hiremath, Vaibhav] I think this has been placed at the right place. This is mux definition and got added to mux.h file. You could see all mux definition are present in this file.

Do you see any issues with this?

Quoted 10 lines
Quoted 3 lines
board/logicpd/am3517evm/am3517evm.c new file +0 -0
@@ -0,0 +1,76 @@

...

board/logicpd/am3517evm/am3517evm.c line 41

Quoted 3 lines
board/logicpd/am3517evm/am3517evm.c new file +3 -0
+int board_init(void)
+{
+	DECLARE_GLOBAL_DATA_PTR;

This is bound to break. DECLARE_GLOBAL_DATA_PTR must always be used on file scope only; never use this on function scope.

[Hiremath, Vaibhav] Agreed. Actually this code is derived form board/ti/evm/, so followed the same here.

I will change it in next post.

Quoted 3 lines

Please check all
your code.

[Hiremath, Vaibhav] Do you see any other issues? I don't get this statement.

Thanks,
Vaibhav

Quoted 12 lines

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: wd at denx.de Genius doesn't work on an assembly line basis. You can't simply say, "Today I will be brilliant."
-- Kirk, "The Ultimate Computer", stardate 4731.3

#120 lore raw

PATCH v3 1/2 AM35x: Add support for AM3517EVM

Dear "Hiremath, Vaibhav",

In message <[email protected]> you wrote:
...

Quoted 15 lines
Quoted 15 lines
Quoted 15 lines

MAINTAINERS Alex Z · line 804

Quoted 12 lines
MAINTAINERS +4 -0
index 5cbc845..0bc65e1 100644
@@ -798,6 +798,10 @@ Alex Z
 	lart		SA1100
 	dnp1110		SA1110
 
+Vaibhav Hiremath <[email protected]>
+
+	am3517_evm	ARM CORTEX-A8 (AM35x SoC)
+

Please keep list sorted.

Quoted 2 lines
Quoted 2 lines

[Hiremath, Vaibhav] How does this sorted, I could not see any relation between the entries there.

The list is sorted alphabetically by maintainer' last names, and then by CPU / board names.

Quoted 13 lines
Quoted 13 lines
Quoted 13 lines

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/include/asm/arch-omap3/mux.h

Quoted 3 lines

index 0c01c73..ffeb982 100644

arch/arm/include/asm/arch-omap3/mux.h +0 -0

...

arch/arm/include/asm/arch-omap3/mux.h line 409

Quoted 3 lines
arch/arm/include/asm/arch-omap3/mux.h +3 -0
+/* AM3517 specific */
+#define CONTROL_PADCONF_CCDC_PCLK	0x01E4
+#define CONTROL_PADCONF_CCDC_FIELD	0x01E6

Board specific defoinitions should not be added to global header files. Please use a board specific header instead.

Quoted 5 lines
Quoted 5 lines

[Hiremath, Vaibhav] I think this has been placed at the right place. This is mux definition and got added to mux.h file. You could see all mux definition are present in this file.

Do you see any issues with this?

Yes, as I wrote: board specific definitions should not be added to global header files. They should be added to board specific files only, avoiding the need for tons of #ifdef's in global files.

Best regards,

Wolfgang Denk

Signature · 5 lines
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: wd at denx.de
When you die, the first thing you lose is your life. The  next  thing
is the illusions.                       - Terry Pratchett, _Pyramids_
#121 lore raw

PATCH v3 1/2 AM35x: Add support for AM3517EVM

Quoted 29 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Monday, June 07, 2010 5:55 PM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de; tom at bumblecow.com; Paulraj, Sandeep; Premi, Sanjeev
Subject: Re: [PATCH-V3 1/2] AM35x: Add support for AM3517EVM

Dear "Hiremath, Vaibhav",

In message <[email protected]> you wrote:
...

Quoted 15 lines
Quoted 15 lines
Quoted 15 lines

MAINTAINERS Alex Z · line 804

Quoted 12 lines
MAINTAINERS +4 -0
index 5cbc845..0bc65e1 100644
@@ -798,6 +798,10 @@ Alex Z
 	lart		SA1100
 	dnp1110		SA1110
 
+Vaibhav Hiremath <[email protected]>
+
+	am3517_evm	ARM CORTEX-A8 (AM35x SoC)
+

Please keep list sorted.

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

[Hiremath, Vaibhav] How does this sorted, I could not see any relation between the entries there.

The list is sorted alphabetically by maintainer' last names, and then by CPU / board names.

[Hiremath, Vaibhav] Thanks, I will update the patch and submit is shortly.

Quoted 16 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/include/asm/arch-omap3/mux.h

Quoted 3 lines

index 0c01c73..ffeb982 100644

arch/arm/include/asm/arch-omap3/mux.h +0 -0

...

Quoted 8 lines
Quoted 8 lines
Quoted 7 lines

arch/arm/include/asm/arch-omap3/mux.h line 409

Quoted 3 lines
arch/arm/include/asm/arch-omap3/mux.h +3 -0
+/* AM3517 specific */
+#define CONTROL_PADCONF_CCDC_PCLK	0x01E4
+#define CONTROL_PADCONF_CCDC_FIELD	0x01E6

Board specific defoinitions should not be added to global header files. Please use a board specific header instead.

[Hiremath, Vaibhav] I think this has been placed at the right place.

This is

Quoted 1 line
Quoted 1 line

mux definition and got added to mux.h file. You could see all mux

Quoted 9 lines

definition

Quoted 3 lines
Quoted 3 lines

are present in this file.

Do you see any issues with this?

Yes, as I wrote: board specific definitions should not be added to global header files. They should be added to board specific files only, avoiding the need for tons of #ifdef's in global files.

[Hiremath, Vaibhav] Yes I agree this has to be there in board header file, but I don't think we are using #ifdefs anywhere for this, since the usage of this is happening through board header file.

I am moving these definitions to board/logicpd/am3517evm/am3517evm.h file.

Thanks,
Vaibhav

Quoted 11 lines

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: wd at denx.de When you die, the first thing you lose is your life. The next thing
is the illusions. - Terry Pratchett, _Pyramids_

#122 lore raw

PATCH v3 2/2 AM35x: Add support for EMIF4

From: Vaibhav Hiremath <[email protected]>

This patch adds support for the EMIF4 interface
available in the AM35x processors.

Changes from V2:
- Removed all instances of #ifdef CONFIG_EMIF4

---
 arch/arm/cpu/arm_cortexa8/omap3/Makefile    |    1 +
 arch/arm/cpu/arm_cortexa8/omap3/emif4.c     |  168 +++++++++++++++++++++++++++
 arch/arm/include/asm/arch-omap3/cpu.h       |   24 ++++
 arch/arm/include/asm/arch-omap3/emif4.h     |   79 +++++++++++++
 arch/arm/include/asm/arch-omap3/sys_proto.h |    1 +
 include/configs/am3517_evm.h                |    2 +-
 6 files changed, 274 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/emif4.c
 create mode 100644 arch/arm/include/asm/arch-omap3/emif4.h
arch/arm/cpu/arm_cortexa8/omap3/Makefile +1 -0
index 1e80eb3..d25bfd5 100644
@@ -38,6 +38,7 @@ COBJS	+= sys_info.o
 COBJS	+= timer.o
 
 COBJS-$(CONFIG_SDRC)	+= sdrc.o
+COBJS-$(CONFIG_EMIF4)	+=emif4.o
 
 SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS) $(COBJS-y) $(SOBJS))
arch/arm/cpu/arm_cortexa8/omap3/emif4.c new file +168 -0

168 lines not on this page · raw message

arch/arm/include/asm/arch-omap3/cpu.h +24 -0
index ce16da7..c072c27 100644
@@ -216,6 +216,30 @@ struct sdrc {
 	struct sdrc_cs cs[2];	/* 0x80 || 0xB0 */
 };
 
+/* EMIF4 */
+typedef struct emif4 {
+	unsigned int sdram_sts;
+	unsigned int sdram_config;
+	unsigned int res1;
+	unsigned int sdram_refresh_ctrl;
+	unsigned int sdram_refresh_ctrl_shdw;
+	unsigned int sdram_time1;
+	unsigned int sdram_time1_shdw;
+	unsigned int sdram_time2;
+	unsigned int sdram_time2_shdw;
+	unsigned int sdram_time3;
+	unsigned int sdram_time3_shdw;
+	unsigned char res2[8];
+	unsigned int sdram_pwr_mgmt;
+	unsigned int sdram_pwr_mgmt_shdw;
+	unsigned char res3[32];
+	unsigned int sdram_iodft_tlgc;
+	unsigned char res4[128];
+	unsigned int ddr_phyctrl1;
+	unsigned int ddr_phyctrl1_shdw;
+	unsigned int ddr_phyctrl2;
+} emif4_t;
+
 #endif /* __ASSEMBLY__ */
 #endif /* __KERNEL_STRICT_NAMES */
 
arch/arm/include/asm/arch-omap3/emif4.h new file +79 -0

79 lines not on this page · raw message

arch/arm/include/asm/arch-omap3/sys_proto.h +1 -0
index 4608f30..db7b42a 100644
@@ -33,6 +33,7 @@ void per_clocks_enable(void);
 void memif_init(void);
 void sdrc_init(void);
 void do_sdrc_init(u32, u32);
+void emif4_init(void);
 void gpmc_init(void);
 void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32 base,
 			u32 size);
include/configs/am3517_evm.h +1 -1
index 63f853a..0106031 100644
@@ -33,7 +33,7 @@
 #define CONFIG_OMAP34XX		1	/* which is a 34XX */
 #define CONFIG_OMAP3_AM3517EVM	1	/* working with AM3517EVM */
 
-#define CONFIG_EMIF4		1	/* The chip has EMIF4 controller */
+#define CONFIG_EMIF4	/* The chip has EMIF4 controller */
 
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap3.h>

--
1.6.2.4

#123 lore raw

PATCH v3 2/2 AM35x: Add support for EMIF4

Dear hvaibhav at ti.com,

Quoted 7 lines · In message <[email protected]> you wrote:

From: Vaibhav Hiremath <[email protected]>

This patch adds support for the EMIF4 interface
available in the AM35x processors.

Changes from V2:
- Removed all instances of #ifdef CONFIG_EMIF4

See previeos comment - such comments belong below the "---" line and not into the commit message.

arch/arm/cpu/arm_cortexa8/omap3/Makefile COBJS += sys_info.o · line 41

Quoted 9 lines
arch/arm/cpu/arm_cortexa8/omap3/Makefile +1 -0
index 1e80eb3..d25bfd5 100644
@@ -38,6 +38,7 @@ COBJS	+= sys_info.o
 COBJS	+= timer.o
 
 COBJS-$(CONFIG_SDRC)	+= sdrc.o
+COBJS-$(CONFIG_EMIF4)	+=emif4.o

Please keep lists sorted.

Best regards,

Wolfgang Denk

Signature · 6 lines
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: wd at denx.de
The complexity of software is an essential property, not an  acciden-
tal  one. Hence, descriptions of a software entity that abstract away
its complexity often abstract away its essence.    - Fred Brooks, Jr.
#124 lore raw

PATCH v3 2/2 AM35x: Add support for EMIF4

Quoted 14 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Monday, May 31, 2010 3:14 PM
To: Hiremath, Vaibhav
Cc: u-boot at lists.denx.de; tom at bumblecow.com; Paulraj, Sandeep; Premi, Sanjeev
Subject: Re: [PATCH-V3 2/2] AM35x: Add support for EMIF4

Dear hvaibhav at ti.com,

Quoted 2 lines · In message <[email protected]> you wrote:

From: Vaibhav Hiremath <[email protected]>

Quoted 9 lines
Quoted 5 lines

This patch adds support for the EMIF4 interface
available in the AM35x processors.

Changes from V2:
- Removed all instances of #ifdef CONFIG_EMIF4

See previeos comment - such comments belong below the "---" line and not into the commit message.

[Hiremath, Vaibhav] OK, I will incorporate changes in next post.

Quoted 8 lines

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/cpu/arm_cortexa8/omap3/Makefile

Quoted 6 lines

index 1e80eb3..d25bfd5 100644

arch/arm/cpu/arm_cortexa8/omap3/Makefile +0 -0
@@ -38,6 +38,7 @@ COBJS	+= sys_info.o
 COBJS	+= timer.o
 
Quoted 5 lines

arch/arm/cpu/arm_cortexa8/omap3/Makefile COBJS += sys_info.o · line 41

Quoted 2 lines
arch/arm/cpu/arm_cortexa8/omap3/Makefile +1 -0
 COBJS-$(CONFIG_SDRC)	+= sdrc.o
+COBJS-$(CONFIG_EMIF4)	+=emif4.o

Please keep lists sorted.

[Hiremath, Vaibhav] Will change and submit it again.

Thanks,
Vaibhav

Quoted 12 lines

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: wd at denx.de The complexity of software is an essential property, not an acciden- tal one. Hence, descriptions of a software entity that abstract away
its complexity often abstract away its essence. - Fred Brooks, Jr.

#125 lore raw

PATCH v4 1/1 OMAP3EVM: Added NAND support

From: Vaibhav Hiremath <[email protected]>

The EVMS have been shipping with NAND (instead of OneNAND) as default. So, this patch sets NAND as default.

To choose OneNAND, define CMD_ONENAND instead of CMD_NAND in the config file omap3_evm.h.

---
Changes from V3 :-
- Added undef statement for CMD_ONENAND.

 include/configs/omap3_evm.h |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
include/configs/omap3_evm.h +7 -1
index 0d99f7d..88af492 100644
@@ -151,7 +151,7 @@
 
 #define CONFIG_CMD_I2C		/* I2C serial bus support	*/
 #define CONFIG_CMD_MMC		/* MMC support			*/
-#define CONFIG_CMD_ONENAND	/* ONENAND support		*/
+#define CONFIG_CMD_NAND		/* NAND support			*/
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_PING
 
@@ -306,7 +306,13 @@
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
 #define CONFIG_SYS_ONENAND_BASE		ONENAND_MAP
 
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_NAND_OMAP_GPMC
+#define GPMC_NAND_ECC_LP_x16_LAYOUT	1
+#define CONFIG_ENV_IS_IN_NAND
+#elif defined(CONFIG_CMD_ONENAND)
 #define CONFIG_ENV_IS_IN_ONENAND	1
+#endif
 #define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 

--
1.6.2.4

#126 lore raw

PATCH v4 1/1 OMAP3EVM: Added NAND support

Quoted 13 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Friday, June 04, 2010 7:15 PM
To: u-boot at lists.denx.de
Cc: Paulraj, Sandeep; tom at bumblecow.com; wd at denx.de; Hiremath, Vaibhav
Subject: [PATCH-V4] OMAP3EVM: Added NAND support

From: Vaibhav Hiremath <[email protected]>

The EVMS have been shipping with NAND (instead of OneNAND) as default. So, this patch sets NAND as default.

Quoted 8 lines

To choose OneNAND, define CMD_ONENAND instead of CMD_NAND in the config file omap3_evm.h.

---
Changes from V3 :-
- Added undef statement for CMD_ONENAND.

[Hiremath, Vaibhav] As suggested by denk, I have moved the comments below ---. The patch content has not been changed so not version.

Hoping this time Tom will merge this patch.

Thanks,
Vaibhav

Quoted 32 lines
 include/configs/omap3_evm.h |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
include/configs/omap3_evm.h +7 -2
index 0d99f7d..88af492 100644
@@ -151,7 +151,7 @@
 
 #define CONFIG_CMD_I2C		/* I2C serial bus support	*/
 #define CONFIG_CMD_MMC		/* MMC support			*/
-#define CONFIG_CMD_ONENAND	/* ONENAND support		*/
+#define CONFIG_CMD_NAND		/* NAND support			*/
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_PING
 
@@ -306,7 +306,13 @@
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
 #define CONFIG_SYS_ONENAND_BASE		ONENAND_MAP
 
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_NAND_OMAP_GPMC
+#define GPMC_NAND_ECC_LP_x16_LAYOUT	1
+#define CONFIG_ENV_IS_IN_NAND
+#elif defined(CONFIG_CMD_ONENAND)
 #define CONFIG_ENV_IS_IN_ONENAND	1
+#endif
 #define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
--

1.6.2.4

#127 lore raw

PATCH v3 2/2 omap3: Consolidate SDRC related operations

From: Vaibhav Hiremath <[email protected]>

Consolidated SDRC related functions into one file - sdrc.c

And also replaced sdrc_init with generic memory init function (mem_init), this generalization of omap memory setup is necessary to support the new emif4 interface introduced in AM3517.

---
Changes from V2:
- Removed all instances of #ifdef CONFIG_SDRC Changes from V1:
- Refreshed against latest denx/master

 arch/arm/cpu/arm_cortexa8/omap3/Makefile    |    4 +-
 arch/arm/cpu/arm_cortexa8/omap3/board.c     |   35 +-----
 arch/arm/cpu/arm_cortexa8/omap3/mem.c       |   90 ------------
 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c      |  202 +++++++++++++++++++++++++++
 arch/arm/cpu/arm_cortexa8/omap3/sys_info.c  |   41 ------
 arch/arm/include/asm/arch-omap3/cpu.h       |    1 +
 arch/arm/include/asm/arch-omap3/mem.h       |   13 ++
 arch/arm/include/asm/arch-omap3/sys_proto.h |    2 -
 include/configs/devkit8000.h                |    2 +
 include/configs/omap3_beagle.h              |    2 +
 include/configs/omap3_evm.h                 |    2 +
 include/configs/omap3_overo.h               |    2 +
 include/configs/omap3_pandora.h             |    2 +
 include/configs/omap3_sdp3430.h             |    2 +
 include/configs/omap3_zoom1.h               |    2 +
 include/configs/omap3_zoom2.h               |    2 +
 16 files changed, 236 insertions(+), 168 deletions(-)
 create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c
arch/arm/cpu/arm_cortexa8/omap3/Makefile +3 -1
index 136b163..1e80eb3 100644
@@ -37,8 +37,10 @@ COBJS	+= syslib.o
 COBJS	+= sys_info.o
 COBJS	+= timer.o
 
+COBJS-$(CONFIG_SDRC)	+= sdrc.o
+
 SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(COBJS) $(SOBJS))
+OBJS	:= $(addprefix $(obj),$(COBJS) $(COBJS-y) $(SOBJS))
 
 all:	 $(obj).depend $(LIB)
 
arch/arm/cpu/arm_cortexa8/omap3/board.c +1 -34
index 69a08fd..d2500ca 100644
@@ -40,8 +40,6 @@
 
 extern omap3_sysinfo sysinfo;
 
-extern u32 is_mem_sdr(void);
-
 /******************************************************************************
  * Routine: delay
  * Description: spinning delay to use before udelay works
@@ -233,7 +231,7 @@ void s_init(void)
 	per_clocks_enable();
 
 	if (!in_sdram)
-		sdrc_init();
+		mem_init();
 }
 
 /******************************************************************************
@@ -274,37 +272,6 @@ void watchdog_init(void)
 }
 
 /******************************************************************************
- * Routine: dram_init
- * Description: sets uboots idea of sdram size
- *****************************************************************************/
-int dram_init(void)
-{
-	DECLARE_GLOBAL_DATA_PTR;
-	unsigned int size0 = 0, size1 = 0;
-
-	size0 = get_sdr_cs_size(CS0);
-
-	/*
-	 * If a second bank of DDR is attached to CS1 this is
-	 * where it can be started.  Early init code will init
-	 * memory on CS0.
-	 */
-	if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) {
-		do_sdrc_init(CS1, NOT_EARLY);
-		make_cs1_contiguous();
-
-		size1 = get_sdr_cs_size(CS1);
-	}
-
-	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-	gd->bd->bi_dram[0].size = size0;
-	gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + get_sdr_cs_offset(CS1);
-	gd->bd->bi_dram[1].size = size1;
-
-	return 0;
-}
-
-/******************************************************************************
  * Dummy function to handle errors for EABI incompatibility
  *****************************************************************************/
 void abort(void)
arch/arm/cpu/arm_cortexa8/omap3/mem.c +0 -90

102 lines not on this page · raw message

arch/arm/cpu/arm_cortexa8/omap3/sdrc.c new file +202 -0

202 lines not on this page · raw message

arch/arm/cpu/arm_cortexa8/omap3/sys_info.c +0 -41

53 lines not on this page · raw message

arch/arm/include/asm/arch-omap3/cpu.h +1 -0
index aa8de32..ce16da7 100644
@@ -215,6 +215,7 @@ struct sdrc {
 	u8 res4[0xC];
 	struct sdrc_cs cs[2];	/* 0x80 || 0xB0 */
 };
+
 #endif /* __ASSEMBLY__ */
 #endif /* __KERNEL_STRICT_NAMES */
 
arch/arm/include/asm/arch-omap3/mem.h +13 -0
index 9439758..a78cf9f 100644
@@ -270,4 +270,17 @@ enum {
 #define PISMO1_ONEN_BASE	ONENAND_MAP
 #define DBG_MPDB_BASE		DEBUG_BASE
 
+#ifndef __ASSEMBLY__
+
+/* Function prototypes */
+void mem_init(void);
+
+u32 is_mem_sdr(void);
+u32 mem_ok(u32 cs);
+
+u32 get_sdr_cs_size(u32);
+u32 get_sdr_cs_offset(u32);
+
+#endif	/* __ASSEMBLY__ */
+
 #endif /* endif _MEM_H_ */
arch/arm/include/asm/arch-omap3/sys_proto.h +0 -2
index 34bd515..4608f30 100644
@@ -46,8 +46,6 @@ u32 get_sysboot_value(void);
 u32 is_gpmc_muxed(void);
 u32 get_gpmc0_type(void);
 u32 get_gpmc0_width(void);
-u32 get_sdr_cs_size(u32);
-u32 get_sdr_cs_offset(u32);
 u32 is_running_in_sdram(void);
 u32 is_running_in_sram(void);
 u32 is_running_in_flash(void);
include/configs/devkit8000.h +2 -0
index 7d1332f..1076de6 100644
@@ -38,6 +38,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_DEVKIT8000	1	/* working with DevKit8000 */
 
+#define CONFIG_SDRC	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_beagle.h +2 -0
index 08d79ac..e018b21 100644
@@ -37,6 +37,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_BEAGLE	1	/* working with BEAGLE */
 
+#define CONFIG_SDRC	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_evm.h +2 -0
index 88af492..af7c65a 100644
@@ -42,6 +42,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_EVM	1	/* working with EVM */
 
+#define CONFIG_SDRC	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>	/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_overo.h +2 -0
index a43500b..b441831 100644
@@ -29,6 +29,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_OVERO	1	/* working with overo */
 
+#define CONFIG_SDRC	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>	/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_pandora.h +2 -0
index 945c053..9eba003 100644
@@ -32,6 +32,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_PANDORA	1	/* working with pandora */
 
+#define CONFIG_SDRC	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>	/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_sdp3430.h +2 -0
index b4919db..d4482d3 100644
@@ -42,6 +42,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_3430SDP	1	/* working with SDP Rev2 */
 
+#define CONFIG_SDRC	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_zoom1.h +2 -0
index ae7ebf9..1e88dc0 100644
@@ -38,6 +38,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_ZOOM1	1	/* working with Zoom MDK Rev1 */
 
+#define CONFIG_SDRC	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_zoom2.h +2 -0
index c88c732..be9daf4 100644
@@ -39,6 +39,8 @@
 #define CONFIG_OMAP3430		1	/* which is in a 3430 */
 #define CONFIG_OMAP3_ZOOM2	1	/* working with Zoom II */
 
+#define CONFIG_SDRC	/* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>	/* get chip and board defs */
 #include <asm/arch/omap3.h>
 

--
1.6.2.4

#128 lore raw

PATCH v3 2/2 omap3: Consolidate SDRC related operations

Quoted 16 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Friday, June 04, 2010 7:23 PM
To: u-boot at lists.denx.de
Cc: Paulraj, Sandeep; tom at bumblecow.com; wd at denx.de; Hiremath, Vaibhav
Subject: [PATCH-V3 2/2] omap3: Consolidate SDRC related operations

From: Vaibhav Hiremath <[email protected]>

Consolidated SDRC related functions into one file - sdrc.c

And also replaced sdrc_init with generic memory init function (mem_init), this generalization of omap memory setup is necessary to support the new emif4 interface introduced in AM3517.

Quoted 6 lines

---
Changes from V2:
- Removed all instances of #ifdef CONFIG_SDRC Changes from V1:
- Refreshed against latest denx/master

[Hiremath, Vaibhav] Again, as per Denk's comment moving patch comment below --- line.

Since last time I didn't get any comments other than this, so hoping this time it gets merged.

Thanks,
Vaibhav

Quoted 651 lines
 arch/arm/cpu/arm_cortexa8/omap3/Makefile    |    4 +-
 arch/arm/cpu/arm_cortexa8/omap3/board.c     |   35 +-----
 arch/arm/cpu/arm_cortexa8/omap3/mem.c       |   90 ------------
 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c      |  202
+++++++++++++++++++++++++++
 arch/arm/cpu/arm_cortexa8/omap3/sys_info.c  |   41 ------
 arch/arm/include/asm/arch-omap3/cpu.h       |    1 +
 arch/arm/include/asm/arch-omap3/mem.h       |   13 ++
 arch/arm/include/asm/arch-omap3/sys_proto.h |    2 -
 include/configs/devkit8000.h                |    2 +
 include/configs/omap3_beagle.h              |    2 +
 include/configs/omap3_evm.h                 |    2 +
 include/configs/omap3_overo.h               |    2 +
 include/configs/omap3_pandora.h             |    2 +
 include/configs/omap3_sdp3430.h             |    2 +
 include/configs/omap3_zoom1.h               |    2 +
 include/configs/omap3_zoom2.h               |    2 +
 16 files changed, 236 insertions(+), 168 deletions(-)
 create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c
arch/arm/cpu/arm_cortexa8/omap3/Makefile +3 -1
index 136b163..1e80eb3 100644
@@ -37,8 +37,10 @@ COBJS      += syslib.o
 COBJS        += sys_info.o
 COBJS        += timer.o
 
+COBJS-$(CONFIG_SDRC) += sdrc.o
+
 SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
+OBJS := $(addprefix $(obj),$(COBJS) $(COBJS-y) $(SOBJS))
 
 all:  $(obj).depend $(LIB)
 
arch/arm/cpu/arm_cortexa8/omap3/board.c +0 -2
index 69a08fd..d2500ca 100644
@@ -40,8 +40,6 @@
 
 extern omap3_sysinfo sysinfo;
 
-extern u32 is_mem_sdr(void);
-
 
 /***************************************************************************
 ***

* Routine: delay
* Description: spinning delay to use before udelay works

arch/arm/cpu/arm_cortexa8/omap3/board.c +1 -1
@@ -233,7 +231,7 @@ void s_init(void)
      per_clocks_enable();
 
      if (!in_sdram)
-             sdrc_init();
+             mem_init();
 }
 
 

/***************************************************************************
***

arch/arm/cpu/arm_cortexa8/omap3/board.c +0 -3
@@ -274,37 +272,6 @@ void watchdog_init(void)
 }
 
 
 /***************************************************************************
 ***
- * Routine: dram_init
- * Description: sets uboots idea of sdram size
-
 ****************************************************************************

*/

arch/arm/cpu/arm_cortexa8/omap3/board.c +0 -28
-int dram_init(void)
-{
-     DECLARE_GLOBAL_DATA_PTR;
-     unsigned int size0 = 0, size1 = 0;
-
-     size0 = get_sdr_cs_size(CS0);
-
-     /*
-      * If a second bank of DDR is attached to CS1 this is
-      * where it can be started.  Early init code will init
-      * memory on CS0.
-      */
-     if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) {
-             do_sdrc_init(CS1, NOT_EARLY);
-             make_cs1_contiguous();
-
-             size1 = get_sdr_cs_size(CS1);
-     }
-
-     gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-     gd->bd->bi_dram[0].size = size0;
-     gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + get_sdr_cs_offset(CS1);
-     gd->bd->bi_dram[1].size = size1;
-
-     return 0;
-}
-
-

/***************************************************************************
***
* Dummy function to handle errors for EABI incompatibility

****************************************************************************
*/
void abort(void)

arch/arm/cpu/arm_cortexa8/omap3/mem.c +0 -20
index dfb7e4c..bd914b0 100644
@@ -79,26 +79,6 @@ static const u32 gpmc_onenand[GPMC_MAX_REG] = {
 
 #endif
 
-static struct sdrc *sdrc_base = (struct sdrc *)OMAP34XX_SDRC_BASE;
-
-/**************************************************************************
- * make_cs1_contiguous() - for es2 and above remap cs1 behind cs0 to allow
- *  command line mem=xyz use all memory with out discontinuous support
- *  compiled in.  Could do it at the ATAG, but there really is two banks...
- * Called as part of 2nd phase DDR init.
-
 **************************************************************************/
-void make_cs1_contiguous(void)
-{
-     u32 size, a_add_low, a_add_high;
-
-     size = get_sdr_cs_size(CS0);
-     size >>= 25;    /* divide by 32 MiB to find size to offset CS1 */
-     a_add_high = (size & 3) << 8;   /* set up low field */
-     a_add_low = (size & 0x3C) >> 2; /* set up high field */
-     writel((a_add_high | a_add_low), &sdrc_base->cs_cfg);
-
-}
-
 /********************************************************
  *  mem_ok() - test used to see if timings are correct

* for a part. Helps in guessing which part

arch/arm/cpu/arm_cortexa8/omap3/mem.c +0 -70
@@ -123,76 +103,6 @@ u32 mem_ok(u32 cs)
              return 1;
 }
 
-/********************************************************
- *  sdrc_init() - init the sdrc chip selects CS0 and CS1
- *  - early init routines, called from flash or
- *  SRAM.
- *******************************************************/
-void sdrc_init(void)
-{
-     /* only init up first bank here */
-     do_sdrc_init(CS0, EARLY_INIT);
-}
-
-/*************************************************************************
- * do_sdrc_init(): initialize the SDRAM for use.
- *  -code sets up SDRAM basic SDRC timings for CS0
- *  -optimal settings can be placed here, or redone after i2c
- *      inspection of board info
- *
- *  - code called once in C-Stack only context for CS0 and a possible 2nd
- *      time depending on memory configuration from stack+global context
-
 **************************************************************************/
-
-void do_sdrc_init(u32 cs, u32 early)
-{
-     struct sdrc_actim *sdrc_actim_base;
-
-     if(cs)
-             sdrc_actim_base = (struct sdrc_actim *)SDRC_ACTIM_CTRL1_BASE;
-     else
-             sdrc_actim_base = (struct sdrc_actim *)SDRC_ACTIM_CTRL0_BASE;
-
-     if (early) {
-             /* reset sdrc controller */
-             writel(SOFTRESET, &sdrc_base->sysconfig);
-             wait_on_value(RESETDONE, RESETDONE, &sdrc_base->status,
-                           12000000);
-             writel(0, &sdrc_base->sysconfig);
-
-             /* setup sdrc to ball mux */
-             writel(SDRC_SHARING, &sdrc_base->sharing);
-
-             /* Disable Power Down of CKE cuz of 1 CKE on combo part */
-             writel(WAKEUPPROC | PWDNEN | SRFRONRESET | PAGEPOLICY_HIGH,
-                             &sdrc_base->power);
-
-             writel(ENADLL | DLLPHASE_90, &sdrc_base->dlla_ctrl);
-             sdelay(0x20000);
-     }
-
-     writel(RASWIDTH_13BITS | CASWIDTH_10BITS | ADDRMUXLEGACY |
-             RAMSIZE_128 | BANKALLOCATION | B32NOT16 | B32NOT16 |
-             DEEPPD | DDR_SDRAM, &sdrc_base->cs[cs].mcfg);
-     writel(ARCV | ARE_ARCV_1, &sdrc_base->cs[cs].rfr_ctrl);
-     writel(V_ACTIMA_165, &sdrc_actim_base->ctrla);
-     writel(V_ACTIMB_165, &sdrc_actim_base->ctrlb);
-
-     writel(CMD_NOP, &sdrc_base ->cs[cs].manual);
-     writel(CMD_PRECHARGE, &sdrc_base->cs[cs].manual);
-     writel(CMD_AUTOREFRESH, &sdrc_base->cs[cs].manual);
-     writel(CMD_AUTOREFRESH, &sdrc_base->cs[cs].manual);
-
-     /*
-      * CAS latency 3, Write Burst = Read Burst, Serial Mode,
-      * Burst length = 4
-      */
-     writel(CASL3 | BURSTLENGTH4, &sdrc_base->cs[cs].mr);
-
-     if (!mem_ok(cs))
-             writel(0, &sdrc_base->cs[cs].mcfg);
-}
-
 void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32
 base,
                      u32 size)

{

arch/arm/cpu/arm_cortexa8/omap3/sdrc.c new file +202 -0
new file mode 100644
index 0000000..96fd990
@@ -0,0 +1,202 @@
+/*
+ * Functions related to OMAP3 SDRC.
+ *
+ * This file has been created after exctracting and consolidating
+ * the SDRC related content from mem.c and board.c, also created
+ * generic init function (mem_init).
+ *
+ * Copyright (C) 2004-2010
+ * Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Author :
+ *     Vaibhav Hiremath <[email protected]>
+ *
+ * Original implementation by (mem.c, board.c) :
+ *      Sunil Kumar <[email protected]>
+ *      Shashi Ranjan <[email protected]>
+ *      Manikandan Pillai <[email protected]>
+ *
+ * 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 <common.h>
+#include <asm/io.h>
+#include <asm/arch/mem.h>
+#include <asm/arch/sys_proto.h>
+
+extern omap3_sysinfo sysinfo;
+
+static struct sdrc *sdrc_base = (struct sdrc *)OMAP34XX_SDRC_BASE;
+
+/*
+ * is_mem_sdr -
+ *  - Return 1 if mem type in use is SDR
+ */
+u32 is_mem_sdr(void)
+{
+     if (readl(&sdrc_base->cs[CS0].mr) == SDRC_MR_0_SDR)
+             return 1;
+     return 0;
+}
+
+/*
+ * make_cs1_contiguous -
+ *  - For es2 and above remap cs1 behind cs0 to allow command line
+ *    mem=xyz use all memory with out discontinuous support compiled in.
+ *    Could do it at the ATAG, but there really is two banks...
+ *  - Called as part of 2nd phase DDR init.
+ */
+void make_cs1_contiguous(void)
+{
+     u32 size, a_add_low, a_add_high;
+
+     size = get_sdr_cs_size(CS0);
+     size >>= 25;    /* divide by 32 MiB to find size to offset CS1 */
+     a_add_high = (size & 3) << 8;   /* set up low field */
+     a_add_low = (size & 0x3C) >> 2; /* set up high field */
+     writel((a_add_high | a_add_low), &sdrc_base->cs_cfg);
+
+}
+
+
+/*
+ * get_sdr_cs_size -
+ *  - Get size of chip select 0/1
+ */
+u32 get_sdr_cs_size(u32 cs)
+{
+     u32 size;
+
+     /* get ram size field */
+     size = readl(&sdrc_base->cs[cs].mcfg) >> 8;
+     size &= 0x3FF;          /* remove unwanted bits */
+     size <<= 21;            /* multiply by 2 MiB to find size in MB */
+     return size;
+}
+
+/*
+ * get_sdr_cs_offset -
+ *  - Get offset of cs from cs0 start
+ */
+u32 get_sdr_cs_offset(u32 cs)
+{
+     u32 offset;
+
+     if (!cs)
+             return 0;
+
+     offset = readl(&sdrc_base->cs_cfg);
+     offset = (offset & 15) << 27 | (offset & 0x30) >> 17;
+
+     return offset;
+}
+
+/*
+ * do_sdrc_init -
+ *  - Initialize the SDRAM for use.
+ *  - Sets up SDRC timings for CS0
+ *  - code called once in C-Stack only context for CS0 and a possible 2nd
+ *    time depending on memory configuration from stack+global context
+ */
+void do_sdrc_init(u32 cs, u32 early)
+{
+     struct sdrc_actim *sdrc_actim_base;
+
+     if (cs)
+             sdrc_actim_base = (struct sdrc_actim *)SDRC_ACTIM_CTRL1_BASE;
+     else
+             sdrc_actim_base = (struct sdrc_actim *)SDRC_ACTIM_CTRL0_BASE;
+
+     if (early) {
+             /* reset sdrc controller */
+             writel(SOFTRESET, &sdrc_base->sysconfig);
+             wait_on_value(RESETDONE, RESETDONE, &sdrc_base->status,
+                             12000000);
+             writel(0, &sdrc_base->sysconfig);
+
+             /* setup sdrc to ball mux */
+             writel(SDRC_SHARING, &sdrc_base->sharing);
+
+             /* Disable Power Down of CKE cuz of 1 CKE on combo part */
+             writel(WAKEUPPROC | SRFRONRESET | PAGEPOLICY_HIGH,
+                             &sdrc_base->power);
+
+             writel(ENADLL | DLLPHASE_90, &sdrc_base->dlla_ctrl);
+             sdelay(0x20000);
+     }
+
+     writel(RASWIDTH_13BITS | CASWIDTH_10BITS | ADDRMUXLEGACY |
+                     RAMSIZE_128 | BANKALLOCATION | B32NOT16 | B32NOT16 |
+                     DEEPPD | DDR_SDRAM, &sdrc_base->cs[cs].mcfg);
+     writel(ARCV | ARE_ARCV_1, &sdrc_base->cs[cs].rfr_ctrl);
+     writel(V_ACTIMA_165, &sdrc_actim_base->ctrla);
+     writel(V_ACTIMB_165, &sdrc_actim_base->ctrlb);
+
+     writel(CMD_NOP, &sdrc_base->cs[cs].manual);
+     writel(CMD_PRECHARGE, &sdrc_base->cs[cs].manual);
+     writel(CMD_AUTOREFRESH, &sdrc_base->cs[cs].manual);
+     writel(CMD_AUTOREFRESH, &sdrc_base->cs[cs].manual);
+
+     /*
+      * CAS latency 3, Write Burst = Read Burst, Serial Mode,
+      * Burst length = 4
+      */
+     writel(CASL3 | BURSTLENGTH4, &sdrc_base->cs[cs].mr);
+
+     if (!mem_ok(cs))
+             writel(0, &sdrc_base->cs[cs].mcfg);
+}
+
+/*
+ * dram_init -
+ *  - Sets uboots idea of sdram size
+ */
+int dram_init(void)
+{
+     DECLARE_GLOBAL_DATA_PTR;
+     unsigned int size0 = 0, size1 = 0;
+
+     size0 = get_sdr_cs_size(CS0);
+     /*
+      * If a second bank of DDR is attached to CS1 this is
+      * where it can be started.  Early init code will init
+      * memory on CS0.
+      */
+     if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) {
+             do_sdrc_init(CS1, NOT_EARLY);
+             make_cs1_contiguous();
+
+             size1 = get_sdr_cs_size(CS1);
+     }
+
+     gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+     gd->bd->bi_dram[0].size = size0;
+     gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + get_sdr_cs_offset(CS1);
+     gd->bd->bi_dram[1].size = size1;
+
+     return 0;
+}
+
+/*
+ * mem_init -
+ *  - Init the sdrc chip,
+ *  - Selects CS0 and CS1,
+ */
+void mem_init(void)
+{
+     /* only init up first bank here */
+     do_sdrc_init(CS0, EARLY_INIT);
+}
arch/arm/cpu/arm_cortexa8/omap3/sys_info.c +0 -41
index 08fb32e..1df4401 100644
@@ -32,7 +32,6 @@
 #include <i2c.h>
 
 extern omap3_sysinfo sysinfo;
-static struct sdrc *sdrc_base = (struct sdrc *)OMAP34XX_SDRC_BASE;
 static struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
 static char *rev_s[CPU_3XX_MAX_REV] = {
                              "1.0",
@@ -104,46 +103,6 @@ u32 get_cpu_rev(void)
      }
 }
 
-/****************************************************
- * is_mem_sdr() - return 1 if mem type in use is SDR
- ****************************************************/
-u32 is_mem_sdr(void)
-{
-     if (readl(&sdrc_base->cs[CS0].mr) == SDRC_MR_0_SDR)
-             return 1;
-     return 0;
-}
-
-/***********************************************************************
- * get_cs0_size() - get size of chip select 0/1
- ************************************************************************/
-u32 get_sdr_cs_size(u32 cs)
-{
-     u32 size;
-
-     /* get ram size field */
-     size = readl(&sdrc_base->cs[cs].mcfg) >> 8;
-     size &= 0x3FF;          /* remove unwanted bits */
-     size <<= 21;            /* multiply by 2 MiB to find size in MB */
-     return size;
-}
-
-/***********************************************************************
- * get_sdr_cs_offset() - get offset of cs from cs0 start
- ************************************************************************/
-u32 get_sdr_cs_offset(u32 cs)
-{
-     u32 offset;
-
-     if (!cs)
-             return 0;
-
-     offset = readl(&sdrc_base->cs_cfg);
-     offset = (offset & 15) << 27 | (offset & 0x30) >> 17;
-
-     return offset;
-}
-
 
 /***************************************************************************
  *  get_gpmc0_base() - Return current address hardware will be

* fetching from. The below effectively gives what is correct, its a
bit

arch/arm/include/asm/arch-omap3/cpu.h +1 -0
index aa8de32..ce16da7 100644
@@ -215,6 +215,7 @@ struct sdrc {
      u8 res4[0xC];
      struct sdrc_cs cs[2];   /* 0x80 || 0xB0 */
 };
+
 #endif /* __ASSEMBLY__ */
 #endif /* __KERNEL_STRICT_NAMES */
 
arch/arm/include/asm/arch-omap3/mem.h +13 -0
index 9439758..a78cf9f 100644
@@ -270,4 +270,17 @@ enum {
 #define PISMO1_ONEN_BASE     ONENAND_MAP
 #define DBG_MPDB_BASE                DEBUG_BASE
 
+#ifndef __ASSEMBLY__
+
+/* Function prototypes */
+void mem_init(void);
+
+u32 is_mem_sdr(void);
+u32 mem_ok(u32 cs);
+
+u32 get_sdr_cs_size(u32);
+u32 get_sdr_cs_offset(u32);
+
+#endif       /* __ASSEMBLY__ */
+
 #endif /* endif _MEM_H_ */
arch/arm/include/asm/arch-omap3/sys_proto.h +0 -2
index 34bd515..4608f30 100644
@@ -46,8 +46,6 @@ u32 get_sysboot_value(void);
 u32 is_gpmc_muxed(void);
 u32 get_gpmc0_type(void);
 u32 get_gpmc0_width(void);
-u32 get_sdr_cs_size(u32);
-u32 get_sdr_cs_offset(u32);
 u32 is_running_in_sdram(void);
 u32 is_running_in_sram(void);
 u32 is_running_in_flash(void);
include/configs/devkit8000.h +2 -0
index 7d1332f..1076de6 100644
@@ -38,6 +38,8 @@
 #define CONFIG_OMAP3430              1       /* which is in a 3430 */
 #define CONFIG_OMAP3_DEVKIT8000      1       /* working with DevKit8000 */
 
+#define CONFIG_SDRC  /* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>            /* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_beagle.h +2 -0
index 08d79ac..e018b21 100644
@@ -37,6 +37,8 @@
 #define CONFIG_OMAP3430              1       /* which is in a 3430 */
 #define CONFIG_OMAP3_BEAGLE  1       /* working with BEAGLE */
 
+#define CONFIG_SDRC  /* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>            /* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_evm.h +2 -0
index 88af492..af7c65a 100644
@@ -42,6 +42,8 @@
 #define CONFIG_OMAP3430              1       /* which is in a 3430 */
 #define CONFIG_OMAP3_EVM     1       /* working with EVM */
 
+#define CONFIG_SDRC  /* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>    /* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_overo.h +2 -0
index a43500b..b441831 100644
@@ -29,6 +29,8 @@
 #define CONFIG_OMAP3430              1       /* which is in a 3430 */
 #define CONFIG_OMAP3_OVERO   1       /* working with overo */
 
+#define CONFIG_SDRC  /* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>    /* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_pandora.h +2 -0
index 945c053..9eba003 100644
@@ -32,6 +32,8 @@
 #define CONFIG_OMAP3430              1       /* which is in a 3430 */
 #define CONFIG_OMAP3_PANDORA 1       /* working with pandora */
 
+#define CONFIG_SDRC  /* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>    /* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_sdp3430.h +2 -0
index b4919db..d4482d3 100644
@@ -42,6 +42,8 @@
 #define CONFIG_OMAP3430              1       /* which is in a 3430 */
 #define CONFIG_OMAP3_3430SDP 1       /* working with SDP Rev2 */
 
+#define CONFIG_SDRC  /* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>            /* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_zoom1.h +2 -0
index ae7ebf9..1e88dc0 100644
@@ -38,6 +38,8 @@
 #define CONFIG_OMAP3430              1       /* which is in a 3430 */
 #define CONFIG_OMAP3_ZOOM1   1       /* working with Zoom MDK Rev1 */
 
+#define CONFIG_SDRC  /* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>            /* get chip and board defs */
 #include <asm/arch/omap3.h>
 
include/configs/omap3_zoom2.h +2 -1
index c88c732..be9daf4 100644
@@ -39,6 +39,8 @@
 #define CONFIG_OMAP3430              1       /* which is in a 3430 */
 #define CONFIG_OMAP3_ZOOM2   1       /* working with Zoom II */
 
+#define CONFIG_SDRC  /* The chip has SDRC controller */
+
 #include <asm/arch/cpu.h>    /* get chip and board defs */
 #include <asm/arch/omap3.h>
 
--

1.6.2.4

#129 lore raw

PATCH v4 1/2 AM35x: Add support for AM3517EVM

From: Vaibhav Hiremath <[email protected]>

This patch adds basic support for the AM3517EVM.
It includes:
- Board files (.c and .h)
- Default configuration file
- Updates for Makefile

---
Changes from V2:
- Removed trailing spaces
- Updated MAINTAINERS & MAKEALL for am3517_evm
Changes from V3:
- Corrected Maintainer entry to keep list sorted
- Moved AM3537 macros to board header file

 MAINTAINERS                         |    4 +
 MAKEALL                             |    1 +
 Makefile                            |    3 +
 board/logicpd/am3517evm/Makefile    |   46 ++++
 board/logicpd/am3517evm/am3517evm.c |   76 ++++++
 board/logicpd/am3517evm/am3517evm.h |  445 +++++++++++++++++++++++++++++++++++
 board/logicpd/am3517evm/config.mk   |   30 +++
 include/configs/am3517_evm.h        |  296 +++++++++++++++++++++++
 8 files changed, 901 insertions(+), 0 deletions(-)
 create mode 100644 board/logicpd/am3517evm/Makefile
 create mode 100644 board/logicpd/am3517evm/am3517evm.c
 create mode 100644 board/logicpd/am3517evm/am3517evm.h
 create mode 100644 board/logicpd/am3517evm/config.mk
 create mode 100644 include/configs/am3517_evm.h
MAINTAINERS +4 -0
index 7a13d28..3f9df78 100644
@@ -600,6 +600,10 @@ Kshitij Gupta <[email protected]>
 	omap1510inn	ARM925T
 	omap1610inn	ARM926EJS
 
+Vaibhav Hiremath <[email protected]>
+
+	am3517_evm	ARM CORTEX-A8 (AM35x SoC)
+
 Grazvydas Ignotas <[email protected]>
 
 	omap3_pandora	ARM CORTEX-A8 (OMAP3xx SoC)
MAKEALL +1 -0
index 2527352..2066587 100755
@@ -641,6 +641,7 @@ LIST_ARM11="			\
 ## ARM Cortex-A8 Systems
 #########################################################################
 LIST_ARM_CORTEX_A8="		\
+	am3517_evm		\
 	devkit8000		\
 	mx51evk			\
 	omap3_beagle		\
Makefile +3 -0
index c26e491..b935c1a 100644
@@ -3155,6 +3155,9 @@ SMN42_config	:	unconfig
 ## ARM CORTEX Systems
 #########################################################################
 
+am3517_evm_config :	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 am3517evm logicpd omap3
+
 devkit8000_config :	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 devkit8000 timll omap3
 
board/logicpd/am3517evm/Makefile new file +46 -0

46 lines not on this page · raw message

board/logicpd/am3517evm/am3517evm.c new file +76 -0

76 lines not on this page · raw message

board/logicpd/am3517evm/am3517evm.h new file +445 -0

445 lines not on this page · raw message

board/logicpd/am3517evm/config.mk new file +30 -0
new file mode 100644
index 0000000..f7a35ce
@@ -0,0 +1,30 @@
+#
+# Author: Vaibhav Hiremath <[email protected]>
+#
+# Based on ti/evm/config.mk
+#
+# Copyright (C) 2010
+# Texas Instruments Incorporated - http://www.ti.com/
+#
+# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# Physical Address:
+# 8000'0000 (bank0)
+# A000/0000 (bank1)
+# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000
+# (mem base + reserved)
+
+# For use with external or internal boots.
+TEXT_BASE = 0x80e80000
include/configs/am3517_evm.h new file +296 -0

296 lines not on this page · raw message

--
1.6.2.4

#130 lore raw

PATCH v4 1/2 AM35x: Add support for AM3517EVM

Quoted 20 lines

From: Vaibhav Hiremath <[email protected]>

This patch adds basic support for the AM3517EVM.
It includes:
- Board files (.c and .h)
- Default configuration file
- Updates for Makefile

---
Changes from V2:
- Removed trailing spaces
- Updated MAINTAINERS & MAKEALL for am3517_evm
Changes from V3:
- Corrected Maintainer entry to keep list sorted
- Moved AM3537 macros to board header file

Quoted 15 lines
 MAINTAINERS                         |    4 +
 MAKEALL                             |    1 +
 Makefile                            |    3 +
 board/logicpd/am3517evm/Makefile    |   46 ++++
 board/logicpd/am3517evm/am3517evm.c |   76 ++++++
 board/logicpd/am3517evm/am3517evm.h |  445
+++++++++++++++++++++++++++++++++++
 board/logicpd/am3517evm/config.mk   |   30 +++
 include/configs/am3517_evm.h        |  296 +++++++++++++++++++++++
 8 files changed, 901 insertions(+), 0 deletions(-)
 create mode 100644 board/logicpd/am3517evm/Makefile
 create mode 100644 board/logicpd/am3517evm/am3517evm.c
 create mode 100644 board/logicpd/am3517evm/am3517evm.h
 create mode 100644 board/logicpd/am3517evm/config.mk
 create mode 100644 include/configs/am3517_evm.h

I have pushed the following to u-boot-ti AFTER running MAKEALL for ALL CORTEX AB boards

I pushed the following patches. There were some checkpatch errors. I fixed them myself.

[PATCH-V4 1/2] AM35x: Add support for AM3517EVM
[PATCH-V4 2/2] AM35x: Add support for EMIF4

[PATCH-V3 1/2] omap3: Calculate CS1 size only when SDRC is initialized for CS1 [PATCH-V3 2/2] omap3: Consolidate SDRC related operations

[PATCH-V4] OMAP3EVM: Added NAND support

Thanks,
Sandeep

#131 lore raw

PATCH 1/1 AM3517:Fix for ARM Relocation support

From: Vaibhav Hiremath <[email protected]>

Also change the CONFIG_SYS_TEXT_BASE to 0x80008000, required with relocation support. This is the load address for primary boot loader (x-loader).

---
 board/logicpd/am3517evm/config.mk |    2 +-
 include/configs/am3517_evm.h      |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)
board/logicpd/am3517evm/config.mk +1 -1
index 102d32b..71ec5d0 100644
@@ -27,4 +27,4 @@
 # (mem base + reserved)
 
 # For use with external or internal boots.
-CONFIG_SYS_TEXT_BASE = 0x80e80000
+CONFIG_SYS_TEXT_BASE = 0x80008000
include/configs/am3517_evm.h +6 -0
index 9a9ba88..3dda1e9 100644
@@ -330,4 +330,10 @@ extern unsigned int boot_flash_sec;
 extern unsigned int boot_flash_type;
 #endif
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define CONFIG_SYS_INIT_RAM_ADDR	0x4020f800
+#define CONFIG_SYS_INIT_RAM_SIZE	0x800
+#define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_INIT_RAM_ADDR + \
+					 CONFIG_SYS_INIT_RAM_SIZE - \
+					 GENERATED_GBL_DATA_SIZE)
 #endif /* __CONFIG_H */
Signature · 1 line
1.6.2.4
#132 lore raw

PATCH 1/1 AM3517:Fix for ARM Relocation support

Quoted 8 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Monday, November 29, 2010 9:52 PM
To: u-boot at lists.denx.de
Cc: albert at aribaud.net; Paulraj, Sandeep; Hiremath, Vaibhav
Subject: [PATCH] AM3517:Fix for ARM Relocation support

Quoted 6 lines

From: Vaibhav Hiremath <[email protected]>

Also change the CONFIG_SYS_TEXT_BASE to 0x80008000, required with relocation support. This is the load address for primary boot loader (x-loader).

[Hiremath, Vaibhav] Albert, Denk and Sandeep,

I have tested this patch with Makefile change (remove sorting of $LIB) on AM3517EVM.

Thanks,
Vaibhav

Quoted 34 lines
---
 board/logicpd/am3517evm/config.mk |    2 +-
 include/configs/am3517_evm.h      |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)
board/logicpd/am3517evm/config.mk +1 -1
index 102d32b..71ec5d0 100644
@@ -27,4 +27,4 @@
 # (mem base + reserved)
 
 # For use with external or internal boots.
-CONFIG_SYS_TEXT_BASE = 0x80e80000
+CONFIG_SYS_TEXT_BASE = 0x80008000
include/configs/am3517_evm.h +6 -1
index 9a9ba88..3dda1e9 100644
@@ -330,4 +330,10 @@ extern unsigned int boot_flash_sec;
 extern unsigned int boot_flash_type;
 #endif
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define CONFIG_SYS_INIT_RAM_ADDR	0x4020f800
+#define CONFIG_SYS_INIT_RAM_SIZE	0x800
+#define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_INIT_RAM_ADDR + \
+					 CONFIG_SYS_INIT_RAM_SIZE - \
+					 GENERATED_GBL_DATA_SIZE)
 #endif /* __CONFIG_H */
--

1.6.2.4

#133 lore raw

PATCH 1/1 AM3517:Fix for ARM Relocation support

Quoted 10 lines
Quoted 10 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Monday, November 29, 2010 9:52 PM
To: u-boot at lists.denx.de
Cc: albert at aribaud.net; Paulraj, Sandeep; Hiremath, Vaibhav
Subject: [PATCH] AM3517:Fix for ARM Relocation support

Quoted 7 lines
Quoted 6 lines

From: Vaibhav Hiremath <[email protected]>

Also change the CONFIG_SYS_TEXT_BASE to 0x80008000, required with relocation support. This is the load address for primary boot loader (x-loader).

[Hiremath, Vaibhav] Albert, Denk and Sandeep,

Thanks,

I will apply this set to u-boot-ti/master sometime tonight and send a pull request to Wolfgang.

Quoted 6 lines

I have tested this patch with Makefile change (remove sorting of $LIB) on AM3517EVM.

Thanks,
Vaibhav

Regards,
Sandeep

#134 lore raw

PATCH 1/1 AM3517:Build FIX: undef CONFIG_CMD_NFS support

From: Vaibhav Hiremath <[email protected]>

Without CONFIG_CMD_NET support CONFIG_CMD_NFS leads to linking error, so disable CONFIG_CMD_NFS option.

---
 include/configs/am3517_evm.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
include/configs/am3517_evm.h +1 -0
index 3dda1e9..70e8f07 100644
@@ -163,6 +163,7 @@
 #define CONFIG_DRIVER_OMAP34XX_I2C	1
 
 #undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
 /*
  * Board NAND Info.
  */
Signature · 1 line
1.6.2.4
#135 lore raw

PATCH 1/1 AM3517:Build FIX: undef CONFIG_CMD_NFS support

Quoted 26 lines

From: Vaibhav Hiremath <[email protected]>

Without CONFIG_CMD_NET support CONFIG_CMD_NFS leads to linking error, so disable CONFIG_CMD_NFS option.

---
 include/configs/am3517_evm.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
include/configs/am3517_evm.h +1 -1
index 3dda1e9..70e8f07 100644
@@ -163,6 +163,7 @@
 #define CONFIG_DRIVER_OMAP34XX_I2C	1
 
 #undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
 /*
  * Board NAND Info.
  */
--
Quoted 1 line

1.6.2.4

Pushed to u-boot-ti

#136 lore raw

PATCH 1/1 AM3517:EMIF4: fix SDRAM size to 256Mb

From: Vaibhav Hiremath <[email protected]>

With addition of "dram_init_banksize()" function from Heiko,Schocher (commit ID: 561142af20f1fd7b425d9425730014e656defb91), the DRAM size is getting configured wrongly to 512Mb (CS0 & CS1).
So fix it to 256Mb.

---
 arch/arm/cpu/armv7/omap3/emif4.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
arch/arm/cpu/armv7/omap3/emif4.c +3 -2
index 0870857..2227576 100644
@@ -48,10 +48,11 @@ u32 is_mem_sdr(void)
  */
 u32 get_sdr_cs_size(u32 cs)
 {
-	u32 size;
+	u32 size = 0;
 
 	/* TODO: Calculate the size based on EMIF4 configuration */
-	size = CONFIG_SYS_CS0_SIZE;
+	if (cs == CS0)
+		size = CONFIG_SYS_CS0_SIZE;
 
 	return size;
 }
Signature · 1 line
1.6.2.4
#137 lore raw

PATCH 1/1 AM3517:EMIF4: fix SDRAM size to 256Mb

Quoted 5 lines

From: Vaibhav Hiremath <[email protected]>

Quoted 7 lines

With addition of "dram_init_banksize()" function from Heiko,Schocher (commit ID: 561142af20f1fd7b425d9425730014e656defb91), the DRAM size is getting configured wrongly to 512Mb (CS0 & CS1).
So fix it to 256Mb.

---

Pushed to u-boot-ti

#138 lore raw

PATCH 1/1 AM3517:EMIF4: fix SDRAM size to 256Mb

In reply to hvaibhav at ti.com
Quoted 34 lines

From: Vaibhav Hiremath <[email protected]>

With addition of "dram_init_banksize()" function from Heiko,Schocher (commit ID: 561142af20f1fd7b425d9425730014e656defb91), the DRAM size is getting configured wrongly to 512Mb (CS0 & CS1).
So fix it to 256Mb.

---
 arch/arm/cpu/armv7/omap3/emif4.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
arch/arm/cpu/armv7/omap3/emif4.c +3 -3
index 0870857..2227576 100644
@@ -48,10 +48,11 @@ u32 is_mem_sdr(void)
  */
 u32 get_sdr_cs_size(u32 cs)
 {
-	u32 size;
+	u32 size = 0;
 
 	/* TODO: Calculate the size based on EMIF4 configuration */
-	size = CONFIG_SYS_CS0_SIZE;
+	if (cs == CS0)
+		size = CONFIG_SYS_CS0_SIZE;
 
 	return size;
 }
--
Quoted 1 line

1.6.2.4

Pushed to u-boot-ti

#139 lore raw

PATCH 1/1 OMAP3/4: Increase console I/O buffer size

From: Vaibhav Hiremath <[email protected]>

Increase the console I/O buffer size (SYS_CBSIZE) to 512 (from 256) required especially for bootargs string, as multiple options (e.g Video settings) are passed to the kernel through bootargs.

---
 include/configs/omap3_beagle.h  |    2 +-
 include/configs/omap3_evm.h     |    2 +-
 include/configs/omap3_overo.h   |    2 +-
 include/configs/omap3_pandora.h |    2 +-
 include/configs/omap3_sdp3430.h |    2 +-
 include/configs/omap3_zoom1.h   |    2 +-
 include/configs/omap3_zoom2.h   |    2 +-
 include/configs/omap4_panda.h   |    2 +-
 include/configs/omap4_sdp4430.h |    2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)
include/configs/omap3_beagle.h +1 -1
index 9fd80ed..14586eb 100644
@@ -262,7 +262,7 @@
 #define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 #define CONFIG_SYS_PROMPT		"OMAP3 beagleboard.org # "
-#define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size */
+#define CONFIG_SYS_CBSIZE		512	/* Console I/O Buffer Size */
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					sizeof(CONFIG_SYS_PROMPT) + 16)
include/configs/omap3_evm.h +1 -1
index 13a4fbf..ed230b6 100644
@@ -238,7 +238,7 @@
 #define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 #define CONFIG_SYS_PROMPT		"OMAP3_EVM # "
-#define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size */
+#define CONFIG_SYS_CBSIZE		512	/* Console I/O Buffer Size */
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					sizeof(CONFIG_SYS_PROMPT) + 16)
include/configs/omap3_overo.h +1 -1
index 242b317..8cf67fd 100644
@@ -214,7 +214,7 @@
 #define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 #define CONFIG_SYS_PROMPT		"Overo # "
-#define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size */
+#define CONFIG_SYS_CBSIZE		512	/* Console I/O Buffer Size */
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					sizeof(CONFIG_SYS_PROMPT) + 16)
include/configs/omap3_pandora.h +1 -1
index 39c87a8..88f421b 100644
@@ -197,7 +197,7 @@
 #define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 #define CONFIG_SYS_PROMPT		"Pandora # "
-#define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size */
+#define CONFIG_SYS_CBSIZE		512	/* Console I/O Buffer Size */
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					sizeof(CONFIG_SYS_PROMPT) + 16)
include/configs/omap3_sdp3430.h +1 -1
index 55bbcd4..f957354 100644
@@ -270,7 +270,7 @@
 #define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 #define CONFIG_SYS_PROMPT		"OMAP34XX SDP # "
-#define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size */
+#define CONFIG_SYS_CBSIZE		512	/* Console I/O Buffer Size */
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					sizeof(CONFIG_SYS_PROMPT) + 16)
include/configs/omap3_zoom1.h +1 -1
index 9183849..f26b28f 100644
@@ -221,7 +221,7 @@
 #define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 #define CONFIG_SYS_PROMPT		"OMAP3 Zoom1 # "
-#define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size */
+#define CONFIG_SYS_CBSIZE		512	/* Console I/O Buffer Size */
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					sizeof(CONFIG_SYS_PROMPT) + 16)
include/configs/omap3_zoom2.h +1 -1
index 3573edf..f0cfd41 100644
@@ -201,7 +201,7 @@
 
 #define CONFIG_SYS_PROMPT		"OMAP3 Zoom2 # "
 #define CONFIG_SYS_LONGHELP
-#define CONFIG_SYS_CBSIZE		256
+#define CONFIG_SYS_CBSIZE		512
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					 sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_SYS_MAXARGS		16
include/configs/omap4_panda.h +1 -1
index 1daffb7..df7aab6 100644
@@ -185,7 +185,7 @@
 #define CONFIG_SYS_HUSH_PARSER	/* use "hush" command parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 #define CONFIG_SYS_PROMPT		"Panda # "
-#define CONFIG_SYS_CBSIZE		256
+#define CONFIG_SYS_CBSIZE		512
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					sizeof(CONFIG_SYS_PROMPT) + 16)
include/configs/omap4_sdp4430.h +1 -1
index 68ffa87..4c183d7 100644
@@ -191,7 +191,7 @@
 #define CONFIG_SYS_HUSH_PARSER	/* use "hush" command parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 #define CONFIG_SYS_PROMPT		"OMAP4430 SDP # "
-#define CONFIG_SYS_CBSIZE		256
+#define CONFIG_SYS_CBSIZE		512
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					sizeof(CONFIG_SYS_PROMPT) + 16)
Signature · 1 line
1.6.2.4
#140 lore raw

PATCH 1/1 OMAP3/4: Increase console I/O buffer size

Quoted 15 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Monday, August 01, 2011 7:49 PM
To: U-Boot at lists.denx.de
Cc: Paulraj, Sandeep; albert.u.boot at aribaud.net; Hiremath, Vaibhav
Subject: [PATCH] OMAP3/4: Increase console I/O buffer size

From: Vaibhav Hiremath <[email protected]>

Increase the console I/O buffer size (SYS_CBSIZE) to 512 (from 256) required especially for bootargs string, as multiple options (e.g Video settings) are passed to the kernel through bootargs.

Quoted 12 lines
---
 include/configs/omap3_beagle.h  |    2 +-
 include/configs/omap3_evm.h     |    2 +-
 include/configs/omap3_overo.h   |    2 +-
 include/configs/omap3_pandora.h |    2 +-
 include/configs/omap3_sdp3430.h |    2 +-
 include/configs/omap3_zoom1.h   |    2 +-
 include/configs/omap3_zoom2.h   |    2 +-
 include/configs/omap4_panda.h   |    2 +-
 include/configs/omap4_sdp4430.h |    2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

[Hiremath, Vaibhav] Sandeep & Albert,

I have not received any comments on this and they all are trivial patches; so can you merge these patches?

List of patches -

- [PATCH] OMAP3/4: Increase console I/O buffer size
- [PATCH] omap3:clock: check cpu_family before enabling clks for IVA & CAM
- [PATCH] omap3:clock: configure GFX clock to 200MHz for AM/DM37x
- [PATCH] omap3evm: Use generic MMC driver
- [PATCH] am3517evm: Use generic MMC driver

Thanks,
Vaibhav

Quoted 123 lines
include/configs/omap3_beagle.h +1 -1
index 9fd80ed..14586eb 100644
@@ -262,7 +262,7 @@
 #define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 #define CONFIG_SYS_PROMPT		"OMAP3 beagleboard.org # "
-#define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size */
+#define CONFIG_SYS_CBSIZE		512	/* Console I/O Buffer Size */
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					sizeof(CONFIG_SYS_PROMPT) + 16)
include/configs/omap3_evm.h +1 -1
index 13a4fbf..ed230b6 100644
@@ -238,7 +238,7 @@
 #define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 #define CONFIG_SYS_PROMPT		"OMAP3_EVM # "
-#define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size */
+#define CONFIG_SYS_CBSIZE		512	/* Console I/O Buffer Size */
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					sizeof(CONFIG_SYS_PROMPT) + 16)
include/configs/omap3_overo.h +1 -1
index 242b317..8cf67fd 100644
@@ -214,7 +214,7 @@
 #define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 #define CONFIG_SYS_PROMPT		"Overo # "
-#define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size */
+#define CONFIG_SYS_CBSIZE		512	/* Console I/O Buffer Size */
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					sizeof(CONFIG_SYS_PROMPT) + 16)
include/configs/omap3_pandora.h +1 -1
index 39c87a8..88f421b 100644
@@ -197,7 +197,7 @@
 #define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 #define CONFIG_SYS_PROMPT		"Pandora # "
-#define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size */
+#define CONFIG_SYS_CBSIZE		512	/* Console I/O Buffer Size */
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					sizeof(CONFIG_SYS_PROMPT) + 16)
include/configs/omap3_sdp3430.h +1 -1
index 55bbcd4..f957354 100644
@@ -270,7 +270,7 @@
 #define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 #define CONFIG_SYS_PROMPT		"OMAP34XX SDP # "
-#define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size */
+#define CONFIG_SYS_CBSIZE		512	/* Console I/O Buffer Size */
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					sizeof(CONFIG_SYS_PROMPT) + 16)
include/configs/omap3_zoom1.h +1 -1
index 9183849..f26b28f 100644
@@ -221,7 +221,7 @@
 #define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 #define CONFIG_SYS_PROMPT		"OMAP3 Zoom1 # "
-#define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size */
+#define CONFIG_SYS_CBSIZE		512	/* Console I/O Buffer Size */
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					sizeof(CONFIG_SYS_PROMPT) + 16)
include/configs/omap3_zoom2.h +1 -1
index 3573edf..f0cfd41 100644
@@ -201,7 +201,7 @@
 
 #define CONFIG_SYS_PROMPT		"OMAP3 Zoom2 # "
 #define CONFIG_SYS_LONGHELP
-#define CONFIG_SYS_CBSIZE		256
+#define CONFIG_SYS_CBSIZE		512
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					 sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_SYS_MAXARGS		16
include/configs/omap4_panda.h +1 -1
index 1daffb7..df7aab6 100644
@@ -185,7 +185,7 @@
 #define CONFIG_SYS_HUSH_PARSER	/* use "hush" command parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 #define CONFIG_SYS_PROMPT		"Panda # "
-#define CONFIG_SYS_CBSIZE		256
+#define CONFIG_SYS_CBSIZE		512
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					sizeof(CONFIG_SYS_PROMPT) + 16)
include/configs/omap4_sdp4430.h +1 -2
index 68ffa87..4c183d7 100644
@@ -191,7 +191,7 @@
 #define CONFIG_SYS_HUSH_PARSER	/* use "hush" command parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 #define CONFIG_SYS_PROMPT		"OMAP4430 SDP # "
-#define CONFIG_SYS_CBSIZE		256
+#define CONFIG_SYS_CBSIZE		512
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
 					sizeof(CONFIG_SYS_PROMPT) + 16)
--

1.6.2.4

#141 lore raw

PATCH 1/1 omap3evm: Use generic MMC driver

From: Vaibhav Hiremath <[email protected]>

Switch from the legacy mmc driver to the
new generic mmc driver.

This patch is based on similar patch for beagle[1].

[1] http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=0cd31144240

---
 board/ti/evm/evm.c          |    9 +++++++++
 include/configs/omap3_evm.h |   10 ++++++----
 2 files changed, 15 insertions(+), 4 deletions(-)
board/ti/evm/evm.c +9 -0
index aaf3033..916a13e 100644
@@ -33,6 +33,7 @@
 #include <asm/arch/mem.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/arch/mmc_host_def.h>
 #include <i2c.h>
 #include <asm/mach-types.h>
 #include "evm.h"
@@ -192,3 +193,11 @@ int board_eth_init(bd_t *bis)
 #endif
 	return rc;
 }
+
+#ifdef CONFIG_GENERIC_MMC
+int board_mmc_init(bd_t *bis)
+{
+       omap_mmc_init(0);
+       return 0;
+}
+#endif
include/configs/omap3_evm.h +6 -4
index 6455b0e..72c00ab 100644
@@ -99,7 +99,8 @@
 #define CONFIG_SYS_BAUDRATE_TABLE	{4800, 9600, 19200, 38400, 57600,\
 					115200}
 #define CONFIG_MMC			1
-#define CONFIG_OMAP3_MMC		1
+#define CONFIG_GENERIC_MMC		1
+#define CONFIG_OMAP_HSMMC		1
 #define CONFIG_DOS_PARTITION		1
 
 /* DDR - I use Micron DDR */
@@ -200,6 +201,7 @@
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"loadaddr=0x82000000\0" \
 	"usbtty=cdc_acm\0" \
+	"mmcdev=0\0" \
 	"console=ttyS2,115200n8\0" \
 	"mmcargs=setenv bootargs console=${console} " \
 		"root=/dev/mmcblk0p2 rw " \
@@ -207,10 +209,10 @@
 	"nandargs=setenv bootargs console=${console} " \
 		"root=/dev/mtdblock4 rw " \
 		"rootfstype=jffs2\0" \
-	"loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
+	"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
 	"bootscript=echo Running bootscript from mmc ...; " \
 		"source ${loadaddr}\0" \
-	"loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
+	"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
 	"mmcboot=echo Booting from mmc ...; " \
 		"run mmcargs; " \
 		"bootm ${loadaddr}\0" \
@@ -220,7 +222,7 @@
 		"bootm ${loadaddr}\0" \
 
 #define CONFIG_BOOTCOMMAND \
-	"if mmc init; then " \
+	"if mmc rescan ${mmcdev}; then " \
 		"if run loadbootscript; then " \
 			"run bootscript; " \
 		"else " \

--
1.6.2.4

#142 lore raw

PATCH 1/1 omap3evm: Use generic MMC driver

Quoted 11 lines · On Mon, Aug 1, 2011 at 9:21 AM, <[email protected]> wrote:

From: Vaibhav Hiremath <[email protected]>

Switch from the legacy mmc driver to the
new generic mmc driver.

This patch is based on similar patch for beagle[1].

?[1] http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=0cd31144240

#143 lore raw

PATCH 1/1 am3517evm: Use generic MMC driver

From: Vaibhav Hiremath <[email protected]>

Switch from the legacy mmc driver to the
new generic mmc driver.

This patch is based on similar patch for beagle[1].

[1] http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=0cd31144240

---
 board/logicpd/am3517evm/am3517evm.c |    9 +++++++++
 include/configs/am3517_evm.h        |   12 +++++++-----
 2 files changed, 16 insertions(+), 5 deletions(-)
board/logicpd/am3517evm/am3517evm.c +9 -0
index bbb6e83..c0a006a 100644
@@ -28,6 +28,7 @@
 #include <asm/arch/mem.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/arch/mmc_host_def.h>
 #include <asm/mach-types.h>
 #include <i2c.h>
 #include "am3517evm.h"
@@ -74,3 +75,11 @@ void set_muxconf_regs(void)
 {
 	MUX_AM3517EVM();
 }
+
+#ifdef CONFIG_GENERIC_MMC
+int board_mmc_init(bd_t *bis)
+{
+       omap_mmc_init(0);
+       return 0;
+}
+#endif
include/configs/am3517_evm.h +7 -5
index 70e8f07..caae7fe 100644
@@ -95,7 +95,8 @@
 #define CONFIG_SYS_BAUDRATE_TABLE	{4800, 9600, 19200, 38400, 57600,\
 					115200}
 #define CONFIG_MMC			1
-#define CONFIG_OMAP3_MMC		1
+#define CONFIG_GENERIC_MMC		1
+#define CONFIG_OMAP_HSMMC		1
 #define CONFIG_DOS_PARTITION		1
 
 /*
@@ -191,17 +192,18 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"loadaddr=0x82000000\0" \
-	"console=ttyS2,115200n8\0" \
+	"console=ttyO2,115200n8\0" \
+	"mmcdev=0\0" \
 	"mmcargs=setenv bootargs console=${console} " \
 		"root=/dev/mmcblk0p2 rw " \
 		"rootfstype=ext3 rootwait\0" \
 	"nandargs=setenv bootargs console=${console} " \
 		"root=/dev/mtdblock4 rw " \
 		"rootfstype=jffs2\0" \
-	"loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
+	"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
 	"bootscript=echo Running bootscript from mmc ...; " \
 		"source ${loadaddr}\0" \
-	"loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
+	"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
 	"mmcboot=echo Booting from mmc ...; " \
 		"run mmcargs; " \
 		"bootm ${loadaddr}\0" \
@@ -211,7 +213,7 @@
 		"bootm ${loadaddr}\0" \
 
 #define CONFIG_BOOTCOMMAND \
-	"if mmc init; then " \
+	"if mmc rescan ${mmcdev}; then " \
 		"if run loadbootscript; then " \
 			"run bootscript; " \
 		"else " \

--
1.6.2.4

#144 lore raw

PATCH 1/1 am3517evm: Use generic MMC driver

Quoted 11 lines · On Mon, Aug 1, 2011 at 9:21 AM, <[email protected]> wrote:

From: Vaibhav Hiremath <[email protected]>

Switch from the legacy mmc driver to the
new generic mmc driver.

This patch is based on similar patch for beagle[1].

?[1] http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=0cd31144240

#145 lore raw

v2 cover Introducing TI's New SoC/board AM335XEVM

From: Vaibhav Hiremath <[email protected]>

This patch set adds support for AM335x device having Cortex-A8 MPU.

AM335X is treated as another OMAP3 variant, where,
along with existing cpu class OMAP34XX, new cpu class AM33XX is created and the respective type is AM335X, which is newly added device in the family. This means, cpu_is_omap34xx(), cpu_is_am33xx() and cpu_is_am335x() checks return success for AM335X.

Currently submitting this patch series as a RFC (V2), to initiate the discussion on the approach we have chosen for AM335x device support. Based on the feedback, will submit the final version of patch series immediately.

This patch series is created on top of linux-omap/master and Hemant's TI814X patches submitted recently.

http://www.mail-archive.com/linux-omap at vger.kernel.org/msg53457.html

Also, I have validated OMAP3 boot test with this patch-series on OMAP3EVM.

Changes from V1:
- Created separate cpu/SoC class for AM33XX family of devices, due to all known facts. This is been mentioned in main-chain

https://patchwork.kernel.org/patch/1056312/

- BUG Fix in debug-macro.S, which was leading to build failure.

      https://patchwork.kernel.org/patch/1056302/

Afzal Mohammed (4):
AM335X: Update common omap platform files
AM335X: Update common OMAP machine specific sources
AM335X: Create board support and enable build for AM335XEVM
AM335X: Add low level debugging support

 arch/arm/mach-omap2/Kconfig                    |   10 ++++
 arch/arm/mach-omap2/Makefile                   |    2 +
 arch/arm/mach-omap2/board-am335xevm.c          |   57 ++++++++++++++++++++++++
 arch/arm/mach-omap2/clock3xxx_data.c           |    3 +
 arch/arm/mach-omap2/common.c                   |   16 +++++++
 arch/arm/mach-omap2/id.c                       |    6 +++
 arch/arm/mach-omap2/include/mach/debug-macro.S |   22 +++++++++
 arch/arm/mach-omap2/io.c                       |   25 ++++++++++
 arch/arm/plat-omap/include/plat/am33xx.h       |   25 ++++++++++
 arch/arm/plat-omap/include/plat/clkdev_omap.h  |    1 +
 arch/arm/plat-omap/include/plat/clock.h        |    1 +
 arch/arm/plat-omap/include/plat/common.h       |    1 +
 arch/arm/plat-omap/include/plat/cpu.h          |   23 ++++++++++
 arch/arm/plat-omap/include/plat/hardware.h     |    1 +
 arch/arm/plat-omap/include/plat/io.h           |   20 ++++++++
 arch/arm/plat-omap/include/plat/omap34xx.h     |    2 +
 arch/arm/plat-omap/include/plat/serial.h       |    4 ++
 arch/arm/plat-omap/include/plat/uncompress.h   |    6 +++
 arch/arm/plat-omap/io.c                        |    3 +
 19 files changed, 228 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-am335xevm.c
 create mode 100644 arch/arm/plat-omap/include/plat/am33xx.h
maintainer
#146 lore raw

v2 cover Introducing TI's New SoC/board AM335XEVM

Quoted 11 lines · hvaibhav at ti.com

From: Vaibhav Hiremath <[email protected]>

This patch set adds support for AM335x device having Cortex-A8 MPU.

AM335X is treated as another OMAP3 variant, where,
along with existing cpu class OMAP34XX, new cpu class AM33XX is created and the respective type is AM335X, which is newly added device in the family. This means, cpu_is_omap34xx(), cpu_is_am33xx() and cpu_is_am335x() checks return success for AM335X.

Quoted 4 lines

Currently submitting this patch series as a RFC (V2), to initiate the discussion on the approach we have chosen for AM335x device support. Based on the feedback, will submit the final version of patch series immediately.

Can you please rebase these on Paul's CHIP_IS removal series?

Those patches are available at:

git://git.pwsan.com/linux-2.6 omap_chip_remove_cleanup_3.2

Regards,

Tony

#147 lore raw

v2 cover Introducing TI's New SoC/board AM335XEVM

Quoted 27 lines

-----Original Message-----
From: Tony Lindgren [mailto:tony at atomide.com]
Sent: Thursday, September 15, 2011 6:02 AM
To: Hiremath, Vaibhav
Cc: linux-omap at vger.kernel.org; Hilman, Kevin; paul at pwsan.com; linux-arm- kernel at lists.infradead.org
Subject: Re: [RFC PATCH-V2 0/4] Introducing TI's New SoC/board AM335XEVM

Quoted 8 lines · hvaibhav at ti.com

From: Vaibhav Hiremath <[email protected]>

This patch set adds support for AM335x device having Cortex-A8 MPU.

AM335X is treated as another OMAP3 variant, where,
along with existing cpu class OMAP34XX, new cpu class AM33XX is created and the respective type is AM335X, which is newly added device in the

family.

Quoted 7 lines

This means, cpu_is_omap34xx(), cpu_is_am33xx() and cpu_is_am335x() checks return success for AM335X.

Currently submitting this patch series as a RFC (V2), to initiate the discussion on the approach we have chosen for AM335x device support. Based on the feedback, will submit the final version of patch series immediately.

Quoted 6 lines

Can you please rebase these on Paul's CHIP_IS removal series?

Those patches are available at:

git://git.pwsan.com/linux-2.6 omap_chip_remove_cleanup_3.2

[Hiremath, Vaibhav] Thanks Tony for your comments,

Yeah, I will rebase and submit it again ASAP.

Thanks,
Vaibhav

Quoted 3 lines

Regards,

Tony

#148 lore raw

PATCH v3 1/4 arm:omap:am33xx: Update common omap platform files

From: Afzal Mohammed <[email protected]>

This patch updates the common platform files with AM335X device support (AM33XX family).

The approach taken in this patch is,
AM33XX device will be considered as OMAP3 variant, and a separate SoC class created for AM33XX family of devices with a subclass type for AM335X device, which is newly added device in the family.

This means, cpu_is_omap34xx(), cpu_is_am33xx() and cpu_is_am335x() checks will return success on AM335X device.
A kernel config option CONFIG_SOC_OMAPAM33XX is added under OMAP3 to include support for AM33XX build.

Also, cpu_mask and RATE_IN_XXX flags have crossed 8 bit hence struct clksel_rate.flags, struct prcm_config.flags and cpu_mask are changed to u16 from u8.

---
 arch/arm/mach-omap2/Kconfig                   |    5 +++++
 arch/arm/mach-omap2/clock.c                   |    2 +-
 arch/arm/mach-omap2/clock.h                   |    2 +-
 arch/arm/mach-omap2/opp2xxx.h                 |    2 +-
 arch/arm/plat-omap/include/plat/clkdev_omap.h |    1 +
 arch/arm/plat-omap/include/plat/clock.h       |    3 ++-
 arch/arm/plat-omap/include/plat/cpu.h         |   25 +++++++++++++++++++++++++
 7 files changed, 36 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/Kconfig +5 -0
index 57b66d5..12ab835 100644
@@ -78,6 +78,11 @@ config SOC_OMAPTI816X
 	depends on ARCH_OMAP3
 	default y
 
+config SOC_OMAPAM33XX
+	bool "AM33XX support"
+	depends on ARCH_OMAP3
+	default y
+
 config OMAP_PACKAGE_ZAF
        bool
 
arch/arm/mach-omap2/clock.c +1 -1
index 1f3481f..f57ed5b 100644
@@ -35,7 +35,7 @@
 #include "cm-regbits-24xx.h"
 #include "cm-regbits-34xx.h"
 
-u8 cpu_mask;
+u16 cpu_mask;
 
 /*
  * clkdm_control: if true, then when a clock is enabled in the
arch/arm/mach-omap2/clock.h +1 -1
index 48ac568..687d3d3 100644
@@ -130,7 +130,7 @@ void omap2_clk_print_new_rates(const char *hfclkin_ck_name,
 			       const char *core_ck_name,
 			       const char *mpu_ck_name);
 
-extern u8 cpu_mask;
+extern u16 cpu_mask;
 
 extern const struct clkops clkops_omap2_dflt_wait;
 extern const struct clkops clkops_dummy;
arch/arm/mach-omap2/opp2xxx.h +1 -1
index 8affc66..8fae534 100644
@@ -51,7 +51,7 @@ struct prcm_config {
 	unsigned long cm_clksel2_pll;	/* dpllx1 or x2 out */
 	unsigned long cm_clksel_mdm;	/* modem dividers 2430 only */
 	unsigned long base_sdrc_rfr;	/* base refresh timing for a set */
-	unsigned char flags;
+	unsigned short flags;
 };
 
 
arch/arm/plat-omap/include/plat/clkdev_omap.h +1 -0
index 387a963..6d84c0c 100644
@@ -40,6 +40,7 @@ struct omap_clk {
 #define CK_443X		(1 << 11)
 #define CK_TI816X	(1 << 12)
 #define CK_446X		(1 << 13)
+#define CK_AM33XX	(1 << 14)	/* AM33xx specific clocks */
 
 
 #define CK_34XX		(CK_3430ES1 | CK_3430ES2PLUS)
arch/arm/plat-omap/include/plat/clock.h +2 -1
index 197ca03..168c54e 100644
@@ -59,6 +59,7 @@ struct clkops {
 #define RATE_IN_4430		(1 << 5)
 #define RATE_IN_TI816X		(1 << 6)
 #define RATE_IN_4460		(1 << 7)
+#define RATE_IN_AM33XX		(1 << 8)
 
 #define RATE_IN_24XX		(RATE_IN_242X | RATE_IN_243X)
 #define RATE_IN_34XX		(RATE_IN_3430ES1 | RATE_IN_3430ES2PLUS)
@@ -84,7 +85,7 @@ struct clkops {
 struct clksel_rate {
 	u32			val;
 	u8			div;
-	u8			flags;
+	u16			flags;
 };
 
 /**
arch/arm/plat-omap/include/plat/cpu.h +25 -0
index 2f90269..9f4d5c3 100644
@@ -78,6 +78,14 @@ static inline int is_omap ##class (void)		\
 	return (GET_OMAP_CLASS == (id)) ? 1 : 0;	\
 }
 
+#define GET_AM_CLASS	((omap_rev() >> 24) & 0xff)
+
+#define IS_AM_CLASS(class, id)			\
+static inline int is_am ##class (void)		\
+{							\
+	return (GET_AM_CLASS == (id)) ? 1 : 0;	\
+}
+
 #define GET_OMAP_SUBCLASS	((omap_rev() >> 20) & 0x0fff)
 
 #define IS_OMAP_SUBCLASS(subclass, id)			\
@@ -92,12 +100,19 @@ static inline int is_ti ##subclass (void)		\
 	return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0;	\
 }
 
+#define IS_AM_SUBCLASS(subclass, id)			\
+static inline int is_am ##subclass (void)		\
+{							\
+	return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0;	\
+}
+
 IS_OMAP_CLASS(7xx, 0x07)
 IS_OMAP_CLASS(15xx, 0x15)
 IS_OMAP_CLASS(16xx, 0x16)
 IS_OMAP_CLASS(24xx, 0x24)
 IS_OMAP_CLASS(34xx, 0x34)
 IS_OMAP_CLASS(44xx, 0x44)
+IS_AM_CLASS(33xx, 0x33)
 
 IS_OMAP_SUBCLASS(242x, 0x242)
 IS_OMAP_SUBCLASS(243x, 0x243)
@@ -107,6 +122,7 @@ IS_OMAP_SUBCLASS(443x, 0x443)
 IS_OMAP_SUBCLASS(446x, 0x446)
 
 IS_TI_SUBCLASS(816x, 0x816)
+IS_AM_SUBCLASS(335x, 0x335)
 
 #define cpu_is_omap7xx()		0
 #define cpu_is_omap15xx()		0
@@ -117,6 +133,8 @@ IS_TI_SUBCLASS(816x, 0x816)
 #define cpu_is_omap34xx()		0
 #define cpu_is_omap343x()		0
 #define cpu_is_ti816x()			0
+#define cpu_is_am33xx()			0
+#define cpu_is_am335x()			0
 #define cpu_is_omap44xx()		0
 #define cpu_is_omap443x()		0
 #define cpu_is_omap446x()		0
@@ -323,6 +341,8 @@ IS_OMAP_TYPE(3517, 0x3517)
 # undef cpu_is_omap3505
 # undef cpu_is_omap3517
 # undef cpu_is_ti816x
+# undef cpu_is_am33xx
+# undef cpu_is_am335x
 # define cpu_is_omap3430()		is_omap3430()
 # define cpu_is_omap3503()		(cpu_is_omap3430() &&		\
 						(!omap3_has_iva()) &&	\
@@ -340,6 +360,8 @@ IS_OMAP_TYPE(3517, 0x3517)
 # undef cpu_is_omap3630
 # define cpu_is_omap3630()		is_omap363x()
 # define cpu_is_ti816x()		is_ti816x()
+# define cpu_is_am33xx()		is_am33xx()
+# define cpu_is_am335x()		is_am335x()
 #endif
 
 # if defined(CONFIG_ARCH_OMAP4)
@@ -386,6 +408,9 @@ IS_OMAP_TYPE(3517, 0x3517)
 #define TI8168_REV_ES1_0	TI816X_CLASS
 #define TI8168_REV_ES1_1	(TI816X_CLASS | (0x1 << 8))
 
+#define AM335X_CLASS		0x33500034
+#define AM335X_REV_ES1_0	AM335X_CLASS
+
 #define OMAP443X_CLASS		0x44300044
 #define OMAP4430_REV_ES1_0	(OMAP443X_CLASS | (0x10 << 8))
 #define OMAP4430_REV_ES2_0	(OMAP443X_CLASS | (0x20 << 8))

--
1.7.0.4

maintainer
#149 lore raw

PATCH v3 1/4 arm:omap:am33xx: Update common omap platform files

Quoted 15 lines · hvaibhav at ti.com

From: Afzal Mohammed <[email protected]>

This patch updates the common platform files with AM335X device support (AM33XX family).

The approach taken in this patch is,
AM33XX device will be considered as OMAP3 variant, and a separate SoC class created for AM33XX family of devices with a subclass type for AM335X device, which is newly added device in the family.

This means, cpu_is_omap34xx(), cpu_is_am33xx() and cpu_is_am335x() checks will return success on AM335X device.
A kernel config option CONFIG_SOC_OMAPAM33XX is added under OMAP3 to include support for AM33XX build.

Quoted 7 lines

Also, cpu_mask and RATE_IN_XXX flags have crossed 8 bit hence struct clksel_rate.flags, struct prcm_config.flags and cpu_mask are changed to u16 from u8.

I'll add this one into soc branch.

Regards,

Tony

#150 lore raw

PATCH v3 2/4 arm:omap:am33xx: Update common OMAP machine specific sources

From: Afzal Mohammed <[email protected]>

This patch updates the common machine specific source files for support for AM33XX/AM335x with cpu type, macros for identification of AM33XX/AM335X device.

---
 arch/arm/mach-omap2/clock3xxx_data.c       |    6 +++++-
 arch/arm/mach-omap2/common.c               |   16 ++++++++++++++++
 arch/arm/mach-omap2/id.c                   |   10 ++++++++--
 arch/arm/mach-omap2/io.c                   |   25 +++++++++++++++++++++++++
 arch/arm/mach-omap2/serial.c               |    6 +++---
 arch/arm/plat-omap/include/plat/am33xx.h   |   25 +++++++++++++++++++++++++
 arch/arm/plat-omap/include/plat/common.h   |    1 +
 arch/arm/plat-omap/include/plat/hardware.h |    1 +
 arch/arm/plat-omap/include/plat/io.h       |   20 ++++++++++++++++++++
 arch/arm/plat-omap/include/plat/omap34xx.h |    2 ++
 arch/arm/plat-omap/io.c                    |    5 +++++
 11 files changed, 111 insertions(+), 6 deletions(-)
 create mode 100644 arch/arm/plat-omap/include/plat/am33xx.h
arch/arm/mach-omap2/clock3xxx_data.c +5 -1
index dadb8c6..2ee472c 100644
@@ -3493,6 +3493,9 @@ int __init omap3xxx_clk_init(void)
 	} else if (cpu_is_ti816x()) {
 		cpu_mask = RATE_IN_TI816X;
 		cpu_clkflg = CK_TI816X;
+	} else if (cpu_is_am33xx()) {
+		cpu_mask = RATE_IN_AM33XX;
+		cpu_clkflg = CK_AM33XX;
 	} else if (cpu_is_omap34xx()) {
 		if (omap_rev() == OMAP3430_REV_ES1_0) {
 			cpu_mask = RATE_IN_3430ES1;
@@ -3576,7 +3579,8 @@ int __init omap3xxx_clk_init(void)
 	 * Lock DPLL5 -- here only until other device init code can
 	 * handle this
 	 */
-	if (!cpu_is_ti816x() && (omap_rev() >= OMAP3430_REV_ES2_0))
+	if (!cpu_is_ti816x() && !cpu_is_am33xx() &&
+			(omap_rev() >= OMAP3430_REV_ES2_0))
 		omap3_clk_lock_dpll5();
 
 	/* Avoid sleeping during omap3_core_dpll_m2_set_rate() */
arch/arm/mach-omap2/common.c +16 -0
index 3f20cbb..395a9b6 100644
@@ -119,6 +119,22 @@ void __init omap2_set_globals_ti816x(void)
 {
 	__omap2_set_globals(&ti816x_globals);
 }
+
+#define AM33XX_TAP_BASE		(AM33XX_CTRL_BASE + \
+				TI816X_CONTROL_DEVICE_ID - 0x204)
+
+static struct omap_globals am33xx_globals = {
+	.class  = OMAP343X_CLASS,
+	.tap    = OMAP2_L4_IO_ADDRESS(AM33XX_TAP_BASE),
+	.ctrl   = AM33XX_CTRL_BASE,
+	.prm    = AM33XX_PRCM_BASE,
+	.cm     = AM33XX_PRCM_BASE,
+};
+
+void __init omap2_set_globals_am33xx(void)
+{
+	__omap2_set_globals(&am33xx_globals);
+}
 #endif
 
 #if defined(CONFIG_ARCH_OMAP4)
arch/arm/mach-omap2/id.c +8 -2
index d27daf9..540b6f1 100644
@@ -337,6 +337,10 @@ static void __init omap3_check_revision(const char **cpu_rev)
 			break;
 		}
 		break;
+	case 0xb944:
+		omap_revision = AM335X_REV_ES1_0;
+		*cpu_rev = "1.0";
+		break;
 	default:
 		/* Unknown default to latest silicon rev as default */
 		omap_revision = OMAP3630_REV_ES1_2;
@@ -429,6 +433,8 @@ static void __init omap3_cpuinfo(const char *cpu_rev)
 		cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505";
 	} else if (cpu_is_ti816x()) {
 		cpu_name = "TI816X";
+	} else if (cpu_is_am335x()) {
+		cpu_name =  "AM335X";
 	} else if (omap3_has_iva() && omap3_has_sgx()) {
 		/* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
 		cpu_name = "OMAP3430/3530";
@@ -469,8 +475,8 @@ void __init omap2_check_revision(void)
 	} else if (cpu_is_omap34xx()) {
 		omap3_check_revision(&cpu_rev);
 
-		/* TI816X doesn't have feature register */
-		if (!cpu_is_ti816x())
+		/* TI816X/AM335X doesn't have feature register */
+		if (!cpu_is_ti816x() && !cpu_is_am33xx())
 			omap3_check_features();
 		else
 			ti816x_check_features();
arch/arm/mach-omap2/io.c +25 -0
index 40b6d47..ccd50de 100644
@@ -182,7 +182,24 @@ static struct map_desc omapti816x_io_desc[] __initdata = {
 		.pfn		= __phys_to_pfn(L4_34XX_PHYS),
 		.length		= L4_34XX_SIZE,
 		.type		= MT_DEVICE
+	}
+};
+#endif
+
+#ifdef CONFIG_SOC_OMAPAM33XX
+static struct map_desc omapam33xx_io_desc[] __initdata = {
+	{
+		.virtual	= L4_34XX_VIRT,
+		.pfn		= __phys_to_pfn(L4_34XX_PHYS),
+		.length		= L4_34XX_SIZE,
+		.type		= MT_DEVICE
 	},
+	{
+		.virtual	= L4_WK_AM33XX_VIRT,
+		.pfn		= __phys_to_pfn(L4_WK_AM33XX_PHYS),
+		.length		= L4_WK_AM33XX_SIZE,
+		.type		= MT_DEVICE
+	}
 };
 #endif
 
@@ -286,6 +303,14 @@ void __init omapti816x_map_common_io(void)
 }
 #endif
 
+#ifdef CONFIG_SOC_OMAPAM33XX
+void __init omapam33xx_map_common_io(void)
+{
+	iotable_init(omapam33xx_io_desc, ARRAY_SIZE(omapam33xx_io_desc));
+	_omap2_map_common_io();
+}
+#endif
+
 #ifdef CONFIG_ARCH_OMAP4
 void __init omap44xx_map_common_io(void)
 {
arch/arm/mach-omap2/serial.c +3 -3
index 466fc72..b7782ee 100644
@@ -486,7 +486,7 @@ static void omap_uart_idle_init(struct omap_uart_state *uart)
 		mod_timer(&uart->timer, jiffies + uart->timeout);
 	omap_uart_smart_idle_enable(uart, 0);
 
-	if (cpu_is_omap34xx() && !cpu_is_ti816x()) {
+	if (cpu_is_omap34xx() && !(cpu_is_ti816x() || cpu_is_am33xx())) {
 		u32 mod = (uart->num > 1) ? OMAP3430_PER_MOD : CORE_MOD;
 		u32 wk_mask = 0;
 		u32 padconf = 0;
@@ -768,7 +768,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
 	 */
 	uart->regshift = p->regshift;
 	uart->membase = p->membase;
-	if (cpu_is_omap44xx() || cpu_is_ti816x())
+	if (cpu_is_omap44xx() || cpu_is_ti816x() || cpu_is_am33xx())
 		uart->errata |= UART_ERRATA_FIFO_FULL_ABORT;
 	else if ((serial_read_reg(uart, UART_OMAP_MVER) & 0xFF)
 			>= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
@@ -851,7 +851,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
 	}
 
 	/* Enable the MDR1 errata for OMAP3 */
-	if (cpu_is_omap34xx() && !cpu_is_ti816x())
+	if (cpu_is_omap34xx() && !(cpu_is_ti816x() || cpu_is_am33xx()))
 		uart->errata |= UART_ERRATA_i202_MDR1_ACCESS;
 }
 
arch/arm/plat-omap/include/plat/am33xx.h new file +25 -0
new file mode 100644
index 0000000..06c19bb
@@ -0,0 +1,25 @@
+/*
+ * This file contains the address info for various AM33XX modules.
+ *
+ * Copyright (C) 2011 Texas Instruments, Inc. - http://www.ti.com/
+ *
+ * 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 version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __ASM_ARCH_AM33XX_H
+#define __ASM_ARCH_AM33XX_H
+
+#define L4_SLOW_AM33XX_BASE	0x48000000
+
+#define AM33XX_SCM_BASE		0x44E10000
+#define AM33XX_CTRL_BASE	AM33XX_SCM_BASE
+#define AM33XX_PRCM_BASE	0x44E00000
+
+#endif /* __ASM_ARCH_AM33XX_H */
arch/arm/plat-omap/include/plat/common.h +1 -0
index 4564cc6..6827e34 100644
@@ -67,6 +67,7 @@ void omap2_set_globals_243x(void);
 void omap2_set_globals_3xxx(void);
 void omap2_set_globals_443x(void);
 void omap2_set_globals_ti816x(void);
+void omap2_set_globals_am33xx(void);
 
 /* These get called from omap2_set_globals_xxxx(), do not call these */
 void omap2_set_globals_tap(struct omap_globals *);
arch/arm/plat-omap/include/plat/hardware.h +1 -0
index e87efe1..e6521e1 100644
@@ -287,5 +287,6 @@
 #include <plat/omap34xx.h>
 #include <plat/omap44xx.h>
 #include <plat/ti816x.h>
+#include <plat/am33xx.h>
 
 #endif	/* __ASM_ARCH_OMAP_HARDWARE_H */
arch/arm/plat-omap/include/plat/io.h +20 -0
index d72ec85..0c54a00 100644
@@ -73,6 +73,9 @@
 #define OMAP4_L3_IO_OFFSET	0xb4000000
 #define OMAP4_L3_IO_ADDRESS(pa)	IOMEM((pa) + OMAP4_L3_IO_OFFSET) /* L3 */
 
+#define AM33XX_L4_WK_IO_OFFSET	0xb5000000
+#define AM33XX_L4_WK_IO_ADDRESS(pa)	IOMEM((pa) + AM33XX_L4_WK_IO_OFFSET)
+
 #define OMAP4_L3_PER_IO_OFFSET	0xb1100000
 #define OMAP4_L3_PER_IO_ADDRESS(pa)	IOMEM((pa) + OMAP4_L3_PER_IO_OFFSET)
 
@@ -154,6 +157,15 @@
 #define L4_34XX_SIZE		SZ_4M   /* 1MB of 128MB used, want 1MB sect */
 
 /*
+ * ----------------------------------------------------------------------------
+ * AM33XX specific IO mapping
+ * ----------------------------------------------------------------------------
+ */
+#define L4_WK_AM33XX_PHYS		L4_WK_AM33XX_BASE
+#define L4_WK_AM33XX_VIRT		(L4_WK_AM33XX_PHYS + AM33XX_L4_WK_IO_OFFSET)
+#define L4_WK_AM33XX_SIZE		SZ_4M   /* 1MB of 128MB used, want 1MB sect */
+
+/*
  * Need to look at the Size 4M for L4.
  * VPOM3430 was not working for Int controller
  */
@@ -291,6 +303,14 @@ static inline void omapti816x_map_common_io(void)
 }
 #endif
 
+#ifdef CONFIG_SOC_OMAPAM33XX
+extern void omapam33xx_map_common_io(void);
+#else
+static inline void omapam33xx_map_common_io(void)
+{
+}
+#endif
+
 #ifdef CONFIG_ARCH_OMAP4
 extern void omap44xx_map_common_io(void);
 #else
arch/arm/plat-omap/include/plat/omap34xx.h +2 -0
index b9e8588..0d818ac 100644
@@ -35,6 +35,8 @@
 #define L4_EMU_34XX_BASE	0x54000000
 #define L3_34XX_BASE		0x68000000
 
+#define L4_WK_AM33XX_BASE	0x44C00000
+
 #define OMAP3430_32KSYNCT_BASE	0x48320000
 #define OMAP3430_CM_BASE	0x48004800
 #define OMAP3430_PRM_BASE	0x48306800
arch/arm/plat-omap/io.c +5 -0
index f1ecfa9..25a32b2 100644
@@ -88,6 +88,11 @@ void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type)
 	if (cpu_is_ti816x()) {
 		if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE))
 			return XLATE(p, L4_34XX_PHYS, L4_34XX_VIRT);
+	} else if (cpu_is_am33xx()) {
+		if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE))
+			return XLATE(p, L4_34XX_PHYS, L4_34XX_VIRT);
+		if (BETWEEN(p, L4_WK_AM33XX_PHYS, L4_WK_AM33XX_SIZE))
+			return XLATE(p, L4_WK_AM33XX_PHYS, L4_WK_AM33XX_VIRT);
 	} else if (cpu_is_omap34xx()) {
 		if (BETWEEN(p, L3_34XX_PHYS, L3_34XX_SIZE))
 			return XLATE(p, L3_34XX_PHYS, L3_34XX_VIRT);

--
1.7.0.4

#151 lore raw

PATCH v3 2/4 arm:omap:am33xx: Update common OMAP machine specific sources

Quoted 8 lines · <[email protected]> writes:

From: Afzal Mohammed <[email protected]>

This patch updates the common machine specific source files for support for AM33XX/AM335x with cpu type, macros for identification of AM33XX/AM335X device.

[...]

arch/arm/mach-omap2/clock3xxx_data.c int __init omap3xxx_clk_init(void) · line 3584

Quoted 8 lines
arch/arm/mach-omap2/clock3xxx_data.c +2 -1
@@ -3576,7 +3579,8 @@ int __init omap3xxx_clk_init(void)
 	 * Lock DPLL5 -- here only until other device init code can
 	 * handle this
 	 */
-	if (!cpu_is_ti816x() && (omap_rev() >= OMAP3430_REV_ES2_0))
+	if (!cpu_is_ti816x() && !cpu_is_am33xx() &&
+			(omap_rev() >= OMAP3430_REV_ES2_0))
 		omap3_clk_lock_dpll5();

This is getting ugly.

Instead of continuing to expand this if-list, I think it's time for a new feature-flag for whether or not an SoC has DPLL5 instead.

Kevin

#152 lore raw

PATCH v3 2/4 arm:omap:am33xx: Update common OMAP machine specific sources

Quoted 36 lines

-----Original Message-----
From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-owner at vger.kernel.org] On Behalf Of Hilman, Kevin
Sent: Tuesday, September 27, 2011 12:16 AM
To: Hiremath, Vaibhav
Cc: linux-omap at vger.kernel.org; paul at pwsan.com;
tony at atomide.com; linux-arm-kernel at lists.infradead.org; Mohammed, Afzal
Subject: Re: [PATCH-V3 2/4] arm:omap:am33xx: Update common OMAP machine specific sources

Quoted 4 lines · <[email protected]> writes:

From: Afzal Mohammed <[email protected]>

This patch updates the common machine specific source files for support for AM33XX/AM335x with cpu type, macros for

identification of

Quoted 4 lines

AM33XX/AM335X device.

[...]

arch/arm/mach-omap2/clock3xxx_data.c int __init omap3xxx_clk_init(void) · line 3584

Quoted 8 lines
arch/arm/mach-omap2/clock3xxx_data.c +2 -1
@@ -3576,7 +3579,8 @@ int __init omap3xxx_clk_init(void)
 	 * Lock DPLL5 -- here only until other device init code can
 	 * handle this
 	 */
-	if (!cpu_is_ti816x() && (omap_rev() >= OMAP3430_REV_ES2_0))
+	if (!cpu_is_ti816x() && !cpu_is_am33xx() &&
+			(omap_rev() >= OMAP3430_REV_ES2_0))
 		omap3_clk_lock_dpll5();

This is getting ugly.

Quoted 2 lines

Instead of continuing to expand this if-list, I think it's time for a new feature-flag for whether or not an SoC has DPLL5 instead.

I agree that the code is really getting ugly here. But, isn't feature-flag going to be over-used with this and similar features?

Just thinking ahead, for these possible cases:
1) An soc adds DPLL6.
2) An soc uses DPLL5, but mechanism to lock is different.

Wouldn't it be better to have a scheme like this:
1) Define a simple structure for DPLLs.
2) Initialize the unused DPLLs to be null/ -1 early in arch/soc specific init.
3) The DPLL functions check for corresponding flag on entry.

~sanjeev

Quoted 9 lines

Kevin

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

#153 lore raw

PATCH v3 2/4 arm:omap:am33xx: Update common OMAP machine specific sources

Quoted 39 lines · Sanjeev
Quoted 36 lines

-----Original Message-----
From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-owner at vger.kernel.org] On Behalf Of Hilman, Kevin
Sent: Tuesday, September 27, 2011 12:16 AM
To: Hiremath, Vaibhav
Cc: linux-omap at vger.kernel.org; paul at pwsan.com;
tony at atomide.com; linux-arm-kernel at lists.infradead.org; Mohammed, Afzal
Subject: Re: [PATCH-V3 2/4] arm:omap:am33xx: Update common OMAP machine specific sources

Quoted 4 lines · <[email protected]> writes:

From: Afzal Mohammed <[email protected]>

This patch updates the common machine specific source files for support for AM33XX/AM335x with cpu type, macros for

identification of

Quoted 4 lines

AM33XX/AM335X device.

[...]

arch/arm/mach-omap2/clock3xxx_data.c int __init omap3xxx_clk_init(void) · line 3584

Quoted 8 lines
arch/arm/mach-omap2/clock3xxx_data.c +2 -1
@@ -3576,7 +3579,8 @@ int __init omap3xxx_clk_init(void)
 	 * Lock DPLL5 -- here only until other device init code can
 	 * handle this
 	 */
-	if (!cpu_is_ti816x() && (omap_rev() >= OMAP3430_REV_ES2_0))
+	if (!cpu_is_ti816x() && !cpu_is_am33xx() &&
+			(omap_rev() >= OMAP3430_REV_ES2_0))
 		omap3_clk_lock_dpll5();

This is getting ugly.

Quoted 2 lines

Instead of continuing to expand this if-list, I think it's time for a new feature-flag for whether or not an SoC has DPLL5 instead.

Quoted 6 lines

I agree that the code is really getting ugly here. But, isn't feature-flag going to be over-used with this and similar features?

Just thinking ahead, for these possible cases:
1) An soc adds DPLL6.
2) An soc uses DPLL5, but mechanism to lock is different.

You're right.

Quoted 6 lines

Wouldn't it be better to have a scheme like this:
1) Define a simple structure for DPLLs.
2) Initialize the unused DPLLs to be null/ -1 early in arch/soc specific init.
3) The DPLL functions check for corresponding flag on entry.

Actually, looking at this closer, I think the infrastructure is already there to handle this cleanly.

Basically, dpll5 should not even be registered for SoCs where it doesn't exist. Then, any attempts to use DPLL5 would know it doesn't exist because the call to clk_get() in omap3_clk_lock_dpll5() would fail.

I think the clock3xxx_data.c needs a bit more cleanup so that only clocks that exist for a given SoC are registered.

Paul already did a similar cleanup for the powerdomain data files by creating separate lists for common ones and unique ones. Looks like we need the same for the clock data.

Patches welcome.

Kevin

maintainer
#154 lore raw

PATCH v3 2/4 arm:omap:am33xx: Update common OMAP machine specific sources

Quoted 8 lines · Kevin Hilman

"Premi, Sanjeev" <[email protected]> writes:

Actually, looking at this closer, I think the infrastructure is already there to handle this cleanly.

Basically, dpll5 should not even be registered for SoCs where it doesn't exist. Then, any attempts to use DPLL5 would know it doesn't exist because the call to clk_get() in omap3_clk_lock_dpll5() would fail.

Yes please use the SoC specific lists, see what we have now queued up in sram-map-io branch. So using SoC specific map_io + init_early + set_globals should do the trick.

Quoted 6 lines

I think the clock3xxx_data.c needs a bit more cleanup so that only clocks that exist for a given SoC are registered.

Paul already did a similar cleanup for the powerdomain data files by creating separate lists for common ones and unique ones. Looks like we need the same for the clock data.

Right.

Regards,

Tony

#155 lore raw

PATCH v3 2/4 arm:omap:am33xx: Update common OMAP machine specific sources

Quoted 15 lines

-----Original Message-----
From: Tony Lindgren [mailto:tony at atomide.com]
Sent: Friday, October 07, 2011 4:33 AM
To: Hilman, Kevin
Cc: Premi, Sanjeev; Hiremath, Vaibhav; linux-omap at vger.kernel.org; paul at pwsan.com; linux-arm-kernel at lists.infradead.org; Mohammed, Afzal
Subject: Re: [PATCH-V3 2/4] arm:omap:am33xx: Update common OMAP machine specific sources

Quoted 5 lines · Kevin Hilman

"Premi, Sanjeev" <[email protected]> writes:

Actually, looking at this closer, I think the infrastructure is already there to handle this cleanly.

Quoted 8 lines
Quoted 3 lines

Basically, dpll5 should not even be registered for SoCs where it doesn't exist. Then, any attempts to use DPLL5 would know it doesn't exist because the call to clk_get() in omap3_clk_lock_dpll5() would fail.

Yes please use the SoC specific lists, see what we have now queued up in sram-map-io branch. So using SoC specific map_io + init_early + set_globals should do the trick.

Sorry for delayed response, was on festival vacation...

Quoted 9 lines
Quoted 6 lines

I think the clock3xxx_data.c needs a bit more cleanup so that only clocks that exist for a given SoC are registered.

Paul already did a similar cleanup for the powerdomain data files by creating separate lists for common ones and unique ones. Looks like we need the same for the clock data.

Right.

I agree that we need to clean clock data, but with the current discussion, feel it may not be so useful, since the clock tree of the AM335x device is different than OMAP3 family of devices -

http://www.ti.com/product/am3359

Public TRM -
http://www.ti.com/lit/ug/spruh73/spruh73.pdf

While porting Linux kernel to AM335x EVM, I had created separate clock data file for AM33xx -
- arch/arm/mach-omap2/clock33xx_data.c

Similar for clock domain data -
- arch/arm/mach-omap2/clockdomains33xx_data.c

So we don't need any of the changes which we are discussing about, since execution doesn't reach there.

Currently looking at clock data, to see how this cleanup can be achieved, any suggestions/comments/pointers would be helpful.

Thanks,
Vaibhav

Quoted 3 lines

Regards,

Tony

#156 lore raw

PATCH v3 2/4 arm:omap:am33xx: Update common OMAP machine specific sources

In reply to hvaibhav at ti.com
Quoted 192 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Tuesday, September 20, 2011 8:02 PM
To: linux-omap at vger.kernel.org
Cc: Hilman, Kevin; paul at pwsan.com; tony at atomide.com; linux-arm- kernel at lists.infradead.org; Mohammed, Afzal; Hiremath, Vaibhav
Subject: [PATCH-V3 2/4] arm:omap:am33xx: Update common OMAP machine specific sources

From: Afzal Mohammed <[email protected]>

This patch updates the common machine specific source files for support for AM33XX/AM335x with cpu type, macros for identification of AM33XX/AM335X device.

---
 arch/arm/mach-omap2/clock3xxx_data.c       |    6 +++++-
 arch/arm/mach-omap2/common.c               |   16 ++++++++++++++++
 arch/arm/mach-omap2/id.c                   |   10 ++++++++--
 arch/arm/mach-omap2/io.c                   |   25
+++++++++++++++++++++++++
 arch/arm/mach-omap2/serial.c               |    6 +++---
 arch/arm/plat-omap/include/plat/am33xx.h   |   25
+++++++++++++++++++++++++
 arch/arm/plat-omap/include/plat/common.h   |    1 +
 arch/arm/plat-omap/include/plat/hardware.h |    1 +
 arch/arm/plat-omap/include/plat/io.h       |   20 ++++++++++++++++++++
 arch/arm/plat-omap/include/plat/omap34xx.h |    2 ++
 arch/arm/plat-omap/io.c                    |    5 +++++
 11 files changed, 111 insertions(+), 6 deletions(-)
 create mode 100644 arch/arm/plat-omap/include/plat/am33xx.h
arch/arm/mach- renamed from arch/arm/mach-omap2/clock3xxx_data.c +0 -0

omap2/clock3xxx_data.c
index dadb8c6..2ee472c 100644

arch/arm/mach-omap2/clock3xxx_data.c +5 -1
@@ -3493,6 +3493,9 @@ int __init omap3xxx_clk_init(void)
 	} else if (cpu_is_ti816x()) {
 		cpu_mask = RATE_IN_TI816X;
 		cpu_clkflg = CK_TI816X;
+	} else if (cpu_is_am33xx()) {
+		cpu_mask = RATE_IN_AM33XX;
+		cpu_clkflg = CK_AM33XX;
 	} else if (cpu_is_omap34xx()) {
 		if (omap_rev() == OMAP3430_REV_ES1_0) {
 			cpu_mask = RATE_IN_3430ES1;
@@ -3576,7 +3579,8 @@ int __init omap3xxx_clk_init(void)
 	 * Lock DPLL5 -- here only until other device init code can
 	 * handle this
 	 */
-	if (!cpu_is_ti816x() && (omap_rev() >= OMAP3430_REV_ES2_0))
+	if (!cpu_is_ti816x() && !cpu_is_am33xx() &&
+			(omap_rev() >= OMAP3430_REV_ES2_0))
 		omap3_clk_lock_dpll5();
 
 	/* Avoid sleeping during omap3_core_dpll_m2_set_rate() */
arch/arm/mach-omap2/common.c +16 -0
index 3f20cbb..395a9b6 100644
@@ -119,6 +119,22 @@ void __init omap2_set_globals_ti816x(void)
 {
 	__omap2_set_globals(&ti816x_globals);
 }
+
+#define AM33XX_TAP_BASE		(AM33XX_CTRL_BASE + \
+				TI816X_CONTROL_DEVICE_ID - 0x204)
+
+static struct omap_globals am33xx_globals = {
+	.class  = OMAP343X_CLASS,
+	.tap    = OMAP2_L4_IO_ADDRESS(AM33XX_TAP_BASE),
+	.ctrl   = AM33XX_CTRL_BASE,
+	.prm    = AM33XX_PRCM_BASE,
+	.cm     = AM33XX_PRCM_BASE,
+};
+
+void __init omap2_set_globals_am33xx(void)
+{
+	__omap2_set_globals(&am33xx_globals);
+}
 #endif
 
 #if defined(CONFIG_ARCH_OMAP4)
arch/arm/mach-omap2/id.c +4 -0
index d27daf9..540b6f1 100644
@@ -337,6 +337,10 @@ static void __init omap3_check_revision(const char
 **cpu_rev)
 			break;
 		}
 		break;
+	case 0xb944:
+		omap_revision = AM335X_REV_ES1_0;
+		*cpu_rev = "1.0";
+		break;
 	default:
 		/* Unknown default to latest silicon rev as default */
arch/arm/mach-omap2/id.c +4 -2
 		omap_revision = OMAP3630_REV_ES1_2;
@@ -429,6 +433,8 @@ static void __init omap3_cpuinfo(const char *cpu_rev)
 		cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505";
 	} else if (cpu_is_ti816x()) {
 		cpu_name = "TI816X";
+	} else if (cpu_is_am335x()) {
+		cpu_name =  "AM335X";
 	} else if (omap3_has_iva() && omap3_has_sgx()) {
 		/* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
 		cpu_name = "OMAP3430/3530";
@@ -469,8 +475,8 @@ void __init omap2_check_revision(void)
 	} else if (cpu_is_omap34xx()) {
 		omap3_check_revision(&cpu_rev);
 
-		/* TI816X doesn't have feature register */
-		if (!cpu_is_ti816x())
+		/* TI816X/AM335X doesn't have feature register */
+		if (!cpu_is_ti816x() && !cpu_is_am33xx())
 			omap3_check_features();
 		else
 			ti816x_check_features();
arch/arm/mach-omap2/io.c +25 -0
index 40b6d47..ccd50de 100644
@@ -182,7 +182,24 @@ static struct map_desc omapti816x_io_desc[]
 __initdata = {
 		.pfn		= __phys_to_pfn(L4_34XX_PHYS),
 		.length		= L4_34XX_SIZE,
 		.type		= MT_DEVICE
+	}
+};
+#endif
+
+#ifdef CONFIG_SOC_OMAPAM33XX
+static struct map_desc omapam33xx_io_desc[] __initdata = {
+	{
+		.virtual	= L4_34XX_VIRT,
+		.pfn		= __phys_to_pfn(L4_34XX_PHYS),
+		.length		= L4_34XX_SIZE,
+		.type		= MT_DEVICE
 	},
+	{
+		.virtual	= L4_WK_AM33XX_VIRT,
+		.pfn		= __phys_to_pfn(L4_WK_AM33XX_PHYS),
+		.length		= L4_WK_AM33XX_SIZE,
+		.type		= MT_DEVICE
+	}
 };
 #endif
@@ -286,6 +303,14 @@ void __init omapti816x_map_common_io(void)
 }
 #endif
 
+#ifdef CONFIG_SOC_OMAPAM33XX
+void __init omapam33xx_map_common_io(void)
+{
+	iotable_init(omapam33xx_io_desc, ARRAY_SIZE(omapam33xx_io_desc));
+	_omap2_map_common_io();
+}
+#endif
+
 #ifdef CONFIG_ARCH_OMAP4
 void __init omap44xx_map_common_io(void)
 {
arch/arm/mach-omap2/serial.c +1 -1
index 466fc72..b7782ee 100644
@@ -486,7 +486,7 @@ static void omap_uart_idle_init(struct omap_uart_state
 *uart)
 		mod_timer(&uart->timer, jiffies + uart->timeout);
 	omap_uart_smart_idle_enable(uart, 0);
 
-	if (cpu_is_omap34xx() && !cpu_is_ti816x()) {
+	if (cpu_is_omap34xx() && !(cpu_is_ti816x() || cpu_is_am33xx())) {
 		u32 mod = (uart->num > 1) ? OMAP3430_PER_MOD : CORE_MOD;
 		u32 wk_mask = 0;
arch/arm/mach-omap2/serial.c +1 -1
 		u32 padconf = 0;
@@ -768,7 +768,7 @@ void __init omap_serial_init_port(struct
 omap_board_data *bdata)
 	 */
 	uart->regshift = p->regshift;
 	uart->membase = p->membase;
-	if (cpu_is_omap44xx() || cpu_is_ti816x())
+	if (cpu_is_omap44xx() || cpu_is_ti816x() || cpu_is_am33xx())
 		uart->errata |= UART_ERRATA_FIFO_FULL_ABORT;
 	else if ((serial_read_reg(uart, UART_OMAP_MVER) & 0xFF)
arch/arm/mach-omap2/serial.c +0 -0
 			>= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)

arch/arm/mach-omap2/serial.c void __init omap_serial_init_port(struct · line 852

Quoted 2 lines
arch/arm/mach-omap2/serial.c +0 -0
@@ -851,7 +851,7 @@ void __init omap_serial_init_port(struct
 omap_board_data *bdata)
 	}

Can I get rid of this if condition as well here with below change -

- * omap44xx, ti816x: Never read empty UART fifo
+ * all >omap3 family of devices: Never read empty UART fifo

         * omap3xxx: Never read empty UART fifo on UARTs
         * with IP rev >=0x52
         */
        uart->regshift = p->regshift;
        uart->membase = p->membase;

- if (cpu_is_omap44xx() || cpu_is_ti816x() || cpu_is_am33xx())
- uart->errata |= UART_ERRATA_FIFO_FULL_ABORT;
- else if ((serial_read_reg(uart, UART_OMAP_MVER) & 0xFF)
- >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
+
+ if ((serial_read_reg(uart, UART_OMAP_MVER) & 0xFF)
+ < UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
+ uart->errata &= ~UART_ERRATA_FIFO_FULL_ABORT;
+ else

                uart->errata |= UART_ERRATA_FIFO_FULL_ABORT;

        if (uart->errata & UART_ERRATA_FIFO_FULL_ABORT) {

Thanks,
Vaibhav

Quoted 151 lines
arch/arm/mach-omap2/serial.c +1 -1
 	/* Enable the MDR1 errata for OMAP3 */
-	if (cpu_is_omap34xx() && !cpu_is_ti816x())
+	if (cpu_is_omap34xx() && !(cpu_is_ti816x() || cpu_is_am33xx()))
 		uart->errata |= UART_ERRATA_i202_MDR1_ACCESS;
 }
 
arch/arm/plat- renamed from arch/arm/plat-omap/include/plat/am33xx.h +0 -0

omap/include/plat/am33xx.h
new file mode 100644
index 0000000..06c19bb

arch/arm/plat-omap/include/plat/am33xx.h new file +25 -0
@@ -0,0 +1,25 @@
+/*
+ * This file contains the address info for various AM33XX modules.
+ *
+ * Copyright (C) 2011 Texas Instruments, Inc. - http://www.ti.com/
+ *
+ * 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 version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __ASM_ARCH_AM33XX_H
+#define __ASM_ARCH_AM33XX_H
+
+#define L4_SLOW_AM33XX_BASE	0x48000000
+
+#define AM33XX_SCM_BASE		0x44E10000
+#define AM33XX_CTRL_BASE	AM33XX_SCM_BASE
+#define AM33XX_PRCM_BASE	0x44E00000
+
+#endif /* __ASM_ARCH_AM33XX_H */
arch/arm/plat- renamed from arch/arm/plat-omap/include/plat/common.h +0 -0

omap/include/plat/common.h
index 4564cc6..6827e34 100644

arch/arm/plat-omap/include/plat/common.h +1 -0
@@ -67,6 +67,7 @@ void omap2_set_globals_243x(void);
 void omap2_set_globals_3xxx(void);
 void omap2_set_globals_443x(void);
 void omap2_set_globals_ti816x(void);
+void omap2_set_globals_am33xx(void);
 
 /* These get called from omap2_set_globals_xxxx(), do not call these */
 void omap2_set_globals_tap(struct omap_globals *);
arch/arm/plat- renamed from arch/arm/plat-omap/include/plat/hardware.h +0 -0

omap/include/plat/hardware.h
index e87efe1..e6521e1 100644

arch/arm/plat-omap/include/plat/hardware.h +1 -0
@@ -287,5 +287,6 @@
 #include <plat/omap34xx.h>
 #include <plat/omap44xx.h>
 #include <plat/ti816x.h>
+#include <plat/am33xx.h>
 
 #endif	/* __ASM_ARCH_OMAP_HARDWARE_H */
arch/arm/plat- renamed from arch/arm/plat-omap/include/plat/io.h +0 -0

omap/include/plat/io.h
index d72ec85..0c54a00 100644

arch/arm/plat-omap/include/plat/io.h +3 -0
@@ -73,6 +73,9 @@
 #define OMAP4_L3_IO_OFFSET	0xb4000000
 #define OMAP4_L3_IO_ADDRESS(pa)	IOMEM((pa) + OMAP4_L3_IO_OFFSET) /* L3
 */
 
+#define AM33XX_L4_WK_IO_OFFSET	0xb5000000
+#define AM33XX_L4_WK_IO_ADDRESS(pa)	IOMEM((pa) +
 AM33XX_L4_WK_IO_OFFSET)
+
 #define OMAP4_L3_PER_IO_OFFSET	0xb1100000

#define OMAP4_L3_PER_IO_ADDRESS(pa) IOMEM((pa) +
OMAP4_L3_PER_IO_OFFSET)

arch/arm/plat-omap/include/plat/io.h +6 -2
@@ -154,6 +157,15 @@
 #define L4_34XX_SIZE		SZ_4M   /* 1MB of 128MB used, want 1MB sect
 */
 
 /*
+ * ----------------------------------------------------------------------
------
+ * AM33XX specific IO mapping
+ * ----------------------------------------------------------------------
------
+ */
+#define L4_WK_AM33XX_PHYS		L4_WK_AM33XX_BASE
+#define L4_WK_AM33XX_VIRT		(L4_WK_AM33XX_PHYS +

AM33XX_L4_WK_IO_OFFSET)
+#define L4_WK_AM33XX_SIZE SZ_4M /* 1MB of 128MB used, want 1MB
sect */

arch/arm/plat-omap/include/plat/io.h +10 -0
+
+/*
  * Need to look at the Size 4M for L4.
  * VPOM3430 was not working for Int controller
  */
@@ -291,6 +303,14 @@ static inline void omapti816x_map_common_io(void)
 }
 #endif
 
+#ifdef CONFIG_SOC_OMAPAM33XX
+extern void omapam33xx_map_common_io(void);
+#else
+static inline void omapam33xx_map_common_io(void)
+{
+}
+#endif
+
 #ifdef CONFIG_ARCH_OMAP4
 extern void omap44xx_map_common_io(void);
 #else
arch/arm/plat- renamed from arch/arm/plat-omap/include/plat/omap34xx.h +0 -0

omap/include/plat/omap34xx.h
index b9e8588..0d818ac 100644

arch/arm/plat-omap/include/plat/omap34xx.h +2 -0
@@ -35,6 +35,8 @@
 #define L4_EMU_34XX_BASE	0x54000000
 #define L3_34XX_BASE		0x68000000
 
+#define L4_WK_AM33XX_BASE	0x44C00000
+
 #define OMAP3430_32KSYNCT_BASE	0x48320000
 #define OMAP3430_CM_BASE	0x48004800
 #define OMAP3430_PRM_BASE	0x48306800
arch/arm/plat-omap/io.c +5 -0
index f1ecfa9..25a32b2 100644
@@ -88,6 +88,11 @@ void __iomem *omap_ioremap(unsigned long p, size_t size,
 unsigned int type)
 	if (cpu_is_ti816x()) {
 		if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE))
 			return XLATE(p, L4_34XX_PHYS, L4_34XX_VIRT);
+	} else if (cpu_is_am33xx()) {
+		if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE))
+			return XLATE(p, L4_34XX_PHYS, L4_34XX_VIRT);
+		if (BETWEEN(p, L4_WK_AM33XX_PHYS, L4_WK_AM33XX_SIZE))
+			return XLATE(p, L4_WK_AM33XX_PHYS, L4_WK_AM33XX_VIRT);
 	} else if (cpu_is_omap34xx()) {
 		if (BETWEEN(p, L3_34XX_PHYS, L3_34XX_SIZE))

return XLATE(p, L3_34XX_PHYS, L3_34XX_VIRT);
--
1.7.0.4

#157 lore raw

PATCH v3 2/4 arm:omap:am33xx: Update common OMAP machine specific sources

Quoted 44 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Saturday, November 05, 2011 3:11 PM
To: Hiremath, Vaibhav; linux-omap at vger.kernel.org
Cc: Hilman, Kevin; paul at pwsan.com; tony at atomide.com; linux-arm- kernel at lists.infradead.org; Mohammed, Afzal
Subject: RE: [PATCH-V3 2/4] arm:omap:am33xx: Update common OMAP machine specific sources

Quoted 34 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Tuesday, September 20, 2011 8:02 PM
To: linux-omap at vger.kernel.org
Cc: Hilman, Kevin; paul at pwsan.com; tony at atomide.com; linux-arm- kernel at lists.infradead.org; Mohammed, Afzal; Hiremath, Vaibhav
Subject: [PATCH-V3 2/4] arm:omap:am33xx: Update common OMAP machine specific sources

From: Afzal Mohammed <[email protected]>

This patch updates the common machine specific source files for support for AM33XX/AM335x with cpu type, macros for identification of AM33XX/AM335X device.

---
 arch/arm/mach-omap2/clock3xxx_data.c       |    6 +++++-
 arch/arm/mach-omap2/common.c               |   16 ++++++++++++++++
 arch/arm/mach-omap2/id.c                   |   10 ++++++++--
 arch/arm/mach-omap2/io.c                   |   25
+++++++++++++++++++++++++
 arch/arm/mach-omap2/serial.c               |    6 +++---
 arch/arm/plat-omap/include/plat/am33xx.h   |   25
+++++++++++++++++++++++++
 arch/arm/plat-omap/include/plat/common.h   |    1 +
 arch/arm/plat-omap/include/plat/hardware.h |    1 +
 arch/arm/plat-omap/include/plat/io.h       |   20 ++++++++++++++++++++
 arch/arm/plat-omap/include/plat/omap34xx.h |    2 ++
 arch/arm/plat-omap/io.c                    |    5 +++++
 11 files changed, 111 insertions(+), 6 deletions(-)
 create mode 100644 arch/arm/plat-omap/include/plat/am33xx.h

<snip>

Quoted 41 lines

arch/arm/mach-omap2/serial.c static void omap_uart_idle_init(struct

Quoted 5 lines
arch/arm/mach-omap2/serial.c +0 -0
index 466fc72..b7782ee 100644
@@ -486,7 +486,7 @@ static void omap_uart_idle_init(struct

omap_uart_state

Quoted 20 lines
arch/arm/mach-omap2/serial.c +1 -1
 *uart)
 		mod_timer(&uart->timer, jiffies + uart->timeout);
 	omap_uart_smart_idle_enable(uart, 0);
 
-	if (cpu_is_omap34xx() && !cpu_is_ti816x()) {
+	if (cpu_is_omap34xx() && !(cpu_is_ti816x() || cpu_is_am33xx())) {
 		u32 mod = (uart->num > 1) ? OMAP3430_PER_MOD : CORE_MOD;
 		u32 wk_mask = 0;
arch/arm/mach-omap2/serial.c +1 -1
 		u32 padconf = 0;
@@ -768,7 +768,7 @@ void __init omap_serial_init_port(struct
 omap_board_data *bdata)
 	 */
 	uart->regshift = p->regshift;
 	uart->membase = p->membase;
-	if (cpu_is_omap44xx() || cpu_is_ti816x())
+	if (cpu_is_omap44xx() || cpu_is_ti816x() || cpu_is_am33xx())
 		uart->errata |= UART_ERRATA_FIFO_FULL_ABORT;
 	else if ((serial_read_reg(uart, UART_OMAP_MVER) & 0xFF)
arch/arm/mach-omap2/serial.c +0 -0
 			>= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)

arch/arm/mach-omap2/serial.c void __init omap_serial_init_port(struct · line 852

Quoted 2 lines
arch/arm/mach-omap2/serial.c +0 -0
@@ -851,7 +851,7 @@ void __init omap_serial_init_port(struct
 omap_board_data *bdata)
 	}

Can I get rid of this if condition as well here with below change -

(quoted diff) +1 -3
-        * omap44xx, ti816x: Never read empty UART fifo
+        * all >omap3 family of devices: Never read empty UART fifo
         * omap3xxx: Never read empty UART fifo on UARTs
         * with IP rev >=0x52
         */
        uart->regshift = p->regshift;
        uart->membase = p->membase;
-       if (cpu_is_omap44xx() || cpu_is_ti816x() || cpu_is_am33xx())
-               uart->errata |= UART_ERRATA_FIFO_FULL_ABORT;

Review

Quoted 10 lines
(quoted diff) +5 -2
-       else if ((serial_read_reg(uart, UART_OMAP_MVER) & 0xFF)
-                       >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
+
+       if ((serial_read_reg(uart, UART_OMAP_MVER) & 0xFF)
+                       < UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
+               uart->errata &= ~UART_ERRATA_FIFO_FULL_ABORT;
+       else
                uart->errata |= UART_ERRATA_FIFO_FULL_ABORT;
 
        if (uart->errata & UART_ERRATA_FIFO_FULL_ABORT) {

Hit send button bit early, realized that, on all other devices (like AM33xx) the rev id is not incremental order, it has been reseted again, sp right condition here would be -

- if (cpu_is_omap44xx() || cpu_is_ti816x() || cpu_is_am33xx())
- uart->errata |= UART_ERRATA_FIFO_FULL_ABORT;
- else if ((serial_read_reg(uart, UART_OMAP_MVER) & 0xFF)
- >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
+
+ if (cpu_is_omap34xx() && (serial_read_reg(uart, UART_OMAP_MVER) & 0xFF)
+ < UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
+ uart->errata &= ~UART_ERRATA_FIFO_FULL_ABORT;
+ else

                 uart->errata |= UART_ERRATA_FIFO_FULL_ABORT;

Thanks,
Vaibhav

Quoted 3 lines

Thanks,
Vaibhav

#158 lore raw

PATCH v3 3/4 arm:omap:am33xx: Create board support and enable build for AM335XEVM

From: Afzal Mohammed <[email protected]>

This patch adds minimal support and build configuration for AM335X EVM.

---
 arch/arm/mach-omap2/Kconfig           |    5 +++
 arch/arm/mach-omap2/Makefile          |    2 +
 arch/arm/mach-omap2/board-am335xevm.c |   57 +++++++++++++++++++++++++++++++++
 3 files changed, 64 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-am335xevm.c
arch/arm/mach-omap2/Kconfig +5 -0
index 12ab835..8533008 100644
@@ -315,6 +315,11 @@ config MACH_TI8168EVM
 	depends on SOC_OMAPTI816X
 	default y
 
+config MACH_AM335XEVM
+	bool "AM335X Evaluation Module"
+	depends on SOC_OMAPAM33XX
+	default y
+
 config MACH_OMAP_4430SDP
 	bool "OMAP 4430 SDP board"
 	default y
arch/arm/mach-omap2/Makefile +2 -0
index 5a6fe73..47d8de1 100644
@@ -259,6 +259,8 @@ obj-$(CONFIG_MACH_CRANEBOARD)		+= board-am3517crane.o
 obj-$(CONFIG_MACH_SBC3530)		+= board-omap3stalker.o \
 					   hsmmc.o
 obj-$(CONFIG_MACH_TI8168EVM)		+= board-ti8168evm.o
+obj-$(CONFIG_MACH_AM335XEVM)		+= board-am335xevm.o
+
 # Platform specific device init code
 usbfs-$(CONFIG_ARCH_OMAP_OTG)		:= usb-fs.o
 obj-y					+= $(usbfs-m) $(usbfs-y)
arch/arm/mach-omap2/board-am335xevm.c new file +57 -0

57 lines not on this page · raw message

--
1.7.0.4

maintainer
#159 lore raw

PATCH v3 3/4 arm:omap:am33xx: Create board support and enable build for AM335XEVM

Quoted 4 lines · hvaibhav at ti.com

From: Afzal Mohammed <[email protected]>

This patch adds minimal support and build configuration for AM335X EVM.

...

arch/arm/mach-omap2/board-am335xevm.c line 57

Quoted 12 lines
arch/arm/mach-omap2/board-am335xevm.c new file +10 -0
+
+MACHINE_START(AM335XEVM, "am335xevm")
+	/* Maintainer: Texas Instruments */
+	.boot_params	= 0x80000100,
+	.map_io		= am335x_evm_map_io,
+	.init_early	= am335x_init_early,
+	.init_irq	= ti816x_init_irq,
+	.timer		= &omap3_timer,
+	.init_machine	= am335x_evm_init,
+MACHINE_END

Please just add the support into board-am3517evm.c, the board-*.c files will be going away with device tree.

Regards,

Tony

#160 lore raw

PATCH v3 4/4 arm:omap:am33xx: Add low level debugging support

From: Afzal Mohammed <[email protected]>

Add support for low level debugging on AM335X EVM (AM33XX family). Currently only support for UART1 console, which is used on AM335X EVM is added.

---
 arch/arm/mach-omap2/include/mach/debug-macro.S |   22 ++++++++++++++++++++++
 arch/arm/plat-omap/include/plat/serial.h       |    4 ++++
 arch/arm/plat-omap/include/plat/uncompress.h   |    6 ++++++
 3 files changed, 32 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/include/mach/debug-macro.S +22 -0
index 48adfe9..f649973 100644
@@ -78,6 +78,8 @@ omap_uart_lsr:	.word	0
 		beq	82f			@ configure UART2
 		cmp	\rp, #TI816XUART3	@ ti816x UART offsets different
 		beq	83f			@ configure UART3
+		cmp	\rp, #AM33XXUART1	@ AM33XX UART offsets different
+		beq	84f			@ configure UART1
 		cmp	\rp, #ZOOM_UART		@ only on zoom2/3
 		beq	95f			@ configure ZOOM_UART
 
@@ -106,6 +108,9 @@ omap_uart_lsr:	.word	0
 		b	98f
 83:		mov	\rp, #UART_OFFSET(TI816X_UART3_BASE)
 		b	98f
+84:		ldr	\rp, =AM33XX_UART1_BASE
+		and	\rp, \rp, #0x00ffffff
+		b	97f
 95:		ldr	\rp, =ZOOM_UART_BASE
 		mrc	p15, 0, \rv, c1, c0
 		tst	\rv, #1			@ MMU enabled?
@@ -121,6 +126,23 @@ omap_uart_lsr:	.word	0
 		b	10b
 
 		/* Store both phys and virt address for the uart */
+97:		add	\rp, \rp, #0x44000000	@ phys base
+		mrc	p15, 0, \rv, c1, c0
+		tst	\rv, #1			@ MMU enabled?
+		ldreq	\rv, =omap_uart_v2p(omap_uart_phys)	@ MMU disabled
+		ldrne	\rv, =omap_uart_phys	@ MMU enabled
+		str	\rp, [\rv, #0]
+		sub	\rp, \rp, #0x44000000	@ phys base
+		add	\rp, \rp, #0xf9000000	@ virt base
+		add	\rv, \rv, #4		@ omap_uart_virt
+		str	\rp, [\rv, #0]
+		mov	\rp, #(UART_LSR << OMAP_PORT_SHIFT)
+		add	\rv, \rv, #4		@ omap_uart_lsr
+		str	\rp, [\rv, #0]
+
+		b	10b
+
+		/* Store both phys and virt address for the uart */
 98:		add	\rp, \rp, #0x48000000	@ phys base
 		mrc	p15, 0, \rv, c1, c0
 		tst	\rv, #1			@ MMU enabled?
arch/arm/plat-omap/include/plat/serial.h +4 -0
index de3b10c..ad19377 100644
@@ -59,6 +59,9 @@
 /* AM3505/3517 UART4 */
 #define AM35XX_UART4_BASE	0x4809E000	/* Only on AM3505/3517 */
 
+/* AM33XX serial port */
+#define AM33XX_UART1_BASE	0x44E09000
+
 /* External port on Zoom2/3 */
 #define ZOOM_UART_BASE		0x10000000
 #define ZOOM_UART_VIRT		0xfa400000
@@ -92,6 +95,7 @@
 #define TI816XUART1		81
 #define TI816XUART2		82
 #define TI816XUART3		83
+#define AM33XXUART1		84
 #define ZOOM_UART		95		/* Only on zoom2/3 */
 
 /* This is only used by 8250.c for omap1510 */
arch/arm/plat-omap/include/plat/uncompress.h +6 -0
index a067484..bd1e051 100644
@@ -97,6 +97,10 @@ static inline void flush(void)
 	_DEBUG_LL_ENTRY(mach, TI816X_UART##p##_BASE, OMAP_PORT_SHIFT,	\
 		TI816XUART##p)
 
+#define DEBUG_LL_AM33XX(p, mach)					\
+	_DEBUG_LL_ENTRY(mach, AM33XX_UART##p##_BASE, OMAP_PORT_SHIFT,	\
+		AM33XXUART##p)
+
 static inline void __arch_decomp_setup(unsigned long arch_id)
 {
 	int port = 0;
@@ -173,6 +177,8 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
 		/* TI8168 base boards using UART3 */
 		DEBUG_LL_TI816X(3, ti8168evm);
 
+		/* AM33XX base boards using UART1 */
+		DEBUG_LL_AM33XX(1, am335xevm);
 	} while (0);
 }
 

--
1.7.0.4

maintainer
#161 lore raw

PATCH v3 4/4 arm:omap:am33xx: Add low level debugging support

Quoted 5 lines · hvaibhav at ti.com

From: Afzal Mohammed <[email protected]>

Add support for low level debugging on AM335X EVM (AM33XX family). Currently only support for UART1 console, which is used on AM335X EVM is added.

Let's wait a bit on this one as there are other DEBUG_LL patches pending from Nico.

Regards,

Tony

#162 lore raw

PATCH v3 4/4 arm:omap:am33xx: Add low level debugging support

Quoted 10 lines

-----Original Message-----
From: Tony Lindgren [mailto:tony at atomide.com]
Sent: Friday, October 07, 2011 4:39 AM
To: Hiremath, Vaibhav
Cc: linux-omap at vger.kernel.org; Hilman, Kevin; paul at pwsan.com; linux-arm- kernel at lists.infradead.org; Mohammed, Afzal
Subject: Re: [PATCH-V3 4/4] arm:omap:am33xx: Add low level debugging support

* hvaibhav at ti.com <[email protected]> [110920 06:59]:

Quoted 9 lines
Quoted 5 lines

From: Afzal Mohammed <[email protected]>

Add support for low level debugging on AM335X EVM (AM33XX family). Currently only support for UART1 console, which is used on AM335X EVM is added.

Let's wait a bit on this one as there are other DEBUG_LL patches pending from Nico.

Tony,

Is there any branch or repo against which I can rebase my patches?

Thanks,
Vaibhav

Quoted 3 lines

Regards,

Tony

maintainer
#163 lore raw

PATCH v3 4/4 arm:omap:am33xx: Add low level debugging support

Quoted 16 lines · Hiremath, Vaibhav
Quoted 16 lines

-----Original Message-----
From: Tony Lindgren [mailto:tony at atomide.com]
Sent: Friday, October 07, 2011 4:39 AM
To: Hiremath, Vaibhav
Cc: linux-omap at vger.kernel.org; Hilman, Kevin; paul at pwsan.com; linux-arm- kernel at lists.infradead.org; Mohammed, Afzal
Subject: Re: [PATCH-V3 4/4] arm:omap:am33xx: Add low level debugging support

Quoted 5 lines · hvaibhav at ti.com

From: Afzal Mohammed <[email protected]>

Add support for low level debugging on AM335X EVM (AM33XX family). Currently only support for UART1 console, which is used on AM335X EVM is added.

Quoted 6 lines
Quoted 3 lines

Let's wait a bit on this one as there are other DEBUG_LL patches pending from Nico.

Tony,

Is there any branch or repo against which I can rebase my patches?

I recommend the current fixes branch.

Tony

#164 lore raw

v5 cover Introducing TI's New SoC/board AM335XEVM

From: Vaibhav Hiremath <[email protected]>

This patch set adds support for AM335x device having Cortex-A8 MPU.

Official website - http://www.ti.com/product/am3359

AM335X is treated as another OMAP3 variant, where,
along with existing cpu class OMAP34XX, new cpu class AM33XX is created and the respective type is AM335X, which is newly added device in the family.
This means, cpu_is_omap34xx(), cpu_is_am33xx() and cpu_is_am335x() checks return success for AM335X.

Also, I have validated OMAP3 boot test with this patch-series on OMAP3EVM.

Changes from V4:
- Patches have been reviewed by Kevin Hilman.
- As per Kevin Hilman's comments updated comment in debug-macro.S, for AM33XX.

Changes from V3:
- Common platform patch has already been accepted and available under linux-omap/soc and linux-omap/master branch.
- Clean-up where cpu_is_xxxx instances are being used and patches has been submitted to the list.
- These patches have been created on top of cleanup patches -
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg58276.html
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg58277.html
- Based on Tony's request, rebased patches against linux-omap/fixes (+ common platform patch).

Changes from V2(RFC):

	- Rebased against Paul's OMAP_CHIP* cleanup patches
	    git://git.pwsan.com/linux-2.6_omap_chip_remove_cleanup_3.2

Changes from V1(RFC):
- Created separate cpu/SoC class for AM33XX family of devices, due to all known facts. This is been mentioned in main-chain
https://patchwork.kernel.org/patch/1056312/
- BUG Fix in debug-macro.S, which was leading to build failure.
https://patchwork.kernel.org/patch/1056302/

Afzal Mohammed (3):
arm:omap:am33xx: Update common OMAP machine specific sources arm:omap:am33xx: Add AM335XEVM machine support arm:omap:am33xx: Add low level debugging support

 arch/arm/mach-omap2/Kconfig                    |    5 ++++
 arch/arm/mach-omap2/Makefile                   |    1 +
 arch/arm/mach-omap2/board-am3517evm.c          |   21 ++++++++++++++++
 arch/arm/mach-omap2/clock3xxx_data.c           |    3 ++
 arch/arm/mach-omap2/common.c                   |   21 ++++++++++++++++
 arch/arm/mach-omap2/id.c                       |    6 ++++
 arch/arm/mach-omap2/include/mach/debug-macro.S |   17 ++++++++++++-
 arch/arm/mach-omap2/io.c                       |   31 ++++++++++++++++++++++++
 arch/arm/mach-omap2/serial.c                   |    4 +-
 arch/arm/mach-omap2/timer.c                    |    2 +
 arch/arm/plat-omap/include/plat/am33xx.h       |   25 +++++++++++++++++++
 arch/arm/plat-omap/include/plat/common.h       |    4 +++
 arch/arm/plat-omap/include/plat/hardware.h     |    1 +
 arch/arm/plat-omap/include/plat/io.h           |   20 +++++++++++++++
 arch/arm/plat-omap/include/plat/omap34xx.h     |    2 +
 arch/arm/plat-omap/include/plat/serial.h       |    4 +++
 arch/arm/plat-omap/include/plat/uncompress.h   |    6 ++++
 arch/arm/plat-omap/io.c                        |    5 ++++
 18 files changed, 175 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/plat-omap/include/plat/am33xx.h
#165 lore raw

v5 cover Introducing TI's New SoC/board AM335XEVM

Quoted 14 lines · <[email protected]> writes:

From: Vaibhav Hiremath <[email protected]>

This patch set adds support for AM335x device having Cortex-A8 MPU.

Official website - http://www.ti.com/product/am3359

AM335X is treated as another OMAP3 variant, where,
along with existing cpu class OMAP34XX, new cpu class AM33XX is created and the respective type is AM335X, which is newly added device in the family.
This means, cpu_is_omap34xx(), cpu_is_am33xx() and cpu_is_am335x() checks return success for AM335X.

Quoted 2 lines

Also, I have validated OMAP3 boot test with this patch-series on OMAP3EVM.

Tony, this series looks good to me.

I've also tested it on a BeagleBone, so feel free to also add:

Kevin

maintainer
#166 lore raw

v5 cover Introducing TI's New SoC/board AM335XEVM

Quoted 16 lines · Kevin Hilman
Quoted 14 lines · <[email protected]> writes:

From: Vaibhav Hiremath <[email protected]>

This patch set adds support for AM335x device having Cortex-A8 MPU.

Official website - http://www.ti.com/product/am3359

AM335X is treated as another OMAP3 variant, where,
along with existing cpu class OMAP34XX, new cpu class AM33XX is created and the respective type is AM335X, which is newly added device in the family.
This means, cpu_is_omap34xx(), cpu_is_am33xx() and cpu_is_am335x() checks return success for AM335X.

Quoted 8 lines
Quoted 2 lines

Also, I have validated OMAP3 boot test with this patch-series on OMAP3EVM.

Tony, this series looks good to me.

I've also tested it on a BeagleBone, so feel free to also add:

Thanks looks good to me. We still need the machine_id update to apply patches 2 and 3 in this series, so applying only the first patch into soc branch for now.

Tony

#167 lore raw

v5 cover Introducing TI's New SoC/board AM335XEVM

Quoted 32 lines

-----Original Message-----
From: Tony Lindgren [mailto:tony at atomide.com]
Sent: Thursday, December 08, 2011 2:40 AM
To: Hilman, Kevin
Cc: Hiremath, Vaibhav; linux-omap at vger.kernel.org; linux-arm- kernel at lists.infradead.org; paul at pwsan.com
Subject: Re: [PATCH-V5 0/3] Introducing TI's New SoC/board AM335XEVM

Quoted 11 lines · Kevin Hilman
Quoted 9 lines · <[email protected]> writes:

From: Vaibhav Hiremath <[email protected]>

This patch set adds support for AM335x device having Cortex-A8 MPU.

Official website - http://www.ti.com/product/am3359

AM335X is treated as another OMAP3 variant, where, along with existing cpu class OMAP34XX, new cpu class AM33XX is

created

Quoted 10 lines
Quoted 7 lines

and the respective type is AM335X, which is newly added device in the family.
This means, cpu_is_omap34xx(), cpu_is_am33xx() and cpu_is_am335x() checks return success for AM335X.

Also, I have validated OMAP3 boot test with this patch-series on OMAP3EVM.

Tony, this series looks good to me.

Quoted 8 lines
Quoted 3 lines

I've also tested it on a BeagleBone, so feel free to also add:

Thanks looks good to me. We still need the machine_id update to apply patches 2 and 3 in this series, so applying only the first patch into soc branch for now.

Tony,

Should I ping Russell for this? The machine-id patch is already registered and present at

http://www.arm.linux.org.uk/developer/machines/download.php

Thanks,
Vaibhav

Quoted 1 line

Tony

maintainer
#168 lore raw

v5 cover Introducing TI's New SoC/board AM335XEVM

Russell,

Quoted 11 lines · Hiremath, Vaibhav
Quoted 10 lines

From: Tony Lindgren [mailto:tony at atomide.com]

Quoted 4 lines · Kevin Hilman

I've also tested it on a BeagleBone, so feel free to also add:

Thanks looks good to me. We still need the machine_id update to apply patches 2 and 3 in this series, so applying only the first patch into soc branch for now.

Quoted 6 lines

Tony,

Should I ping Russell for this? The machine-id patch is already registered and present at

http://www.arm.linux.org.uk/developer/machines/download.php

Care to push the machine_id updates into devel-stable?

Regards,

Tony

#169 lore raw

v5 cover Introducing TI's New SoC/board AM335XEVM

Quoted 14 lines · Tony Lindgren

Russell,

Quoted 11 lines · Hiremath, Vaibhav
Quoted 10 lines

From: Tony Lindgren [mailto:tony at atomide.com]

Quoted 4 lines · Kevin Hilman

I've also tested it on a BeagleBone, so feel free to also add:

Thanks looks good to me. We still need the machine_id update to apply patches 2 and 3 in this series, so applying only the first patch into soc branch for now.

Quoted 9 lines
Quoted 6 lines

Tony,

Should I ping Russell for this? The machine-id patch is already registered and present at

http://www.arm.linux.org.uk/developer/machines/download.php

Care to push the machine_id updates into devel-stable?

Tony,

Can you merge patches 2 & 3 from this series,
as mach-id for AM335xEVM is already available in Mainline (linus/master or linux-omap/master)?

Thanks,
Vaibhav

Quoted 4 lines

Regards,

Tony

#170 lore raw

v5 cover Introducing TI's New SoC/board AM335XEVM

In reply to Tony Lindgren
Quoted 22 lines · Tony Lindgren
Quoted 21 lines · Kevin Hilman
Quoted 14 lines · <[email protected]> writes:

From: Vaibhav Hiremath <[email protected]>

This patch set adds support for AM335x device having Cortex-A8 MPU.

Official website - http://www.ti.com/product/am3359

AM335X is treated as another OMAP3 variant, where,
along with existing cpu class OMAP34XX, new cpu class AM33XX is created and the respective type is AM335X, which is newly added device in the family.
This means, cpu_is_omap34xx(), cpu_is_am33xx() and cpu_is_am335x() checks return success for AM335X.

Quoted 2 lines

Also, I have validated OMAP3 boot test with this patch-series on OMAP3EVM.

Tony, this series looks good to me.

Quoted 8 lines
Quoted 3 lines

I've also tested it on a BeagleBone, so feel free to also add:

Thanks looks good to me. We still need the machine_id update to apply patches 2 and 3 in this series, so applying only the first patch into soc branch for now.

Tony,

Can you also merge this patch, as machine_id for am335x-evm is already updated in linus/master?

Thanks,
Vaibhav

Quoted 2 lines

Tony

#171 lore raw

PATCH v5 1/3 arm:omap:am33xx: Update common OMAP machine specific sources

From: Afzal Mohammed <[email protected]>

This patch updates the common machine specific source files for support for AM33XX/AM335x with cpu type, macros for identification of AM33XX/AM335X device.

---
 arch/arm/mach-omap2/clock3xxx_data.c       |    3 +++
 arch/arm/mach-omap2/common.c               |   21 +++++++++++++++++++++
 arch/arm/mach-omap2/id.c                   |    6 ++++++
 arch/arm/mach-omap2/io.c                   |   24 ++++++++++++++++++++++++
 arch/arm/mach-omap2/serial.c               |    4 ++--
 arch/arm/plat-omap/include/plat/am33xx.h   |   25 +++++++++++++++++++++++++
 arch/arm/plat-omap/include/plat/common.h   |    2 ++
 arch/arm/plat-omap/include/plat/hardware.h |    1 +
 arch/arm/plat-omap/include/plat/io.h       |   20 ++++++++++++++++++++
 arch/arm/plat-omap/include/plat/omap34xx.h |    2 ++
 arch/arm/plat-omap/io.c                    |    5 +++++
 11 files changed, 111 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/plat-omap/include/plat/am33xx.h
arch/arm/mach-omap2/clock3xxx_data.c +3 -0
index 5d0064a..c1ab6bc 100644
@@ -3517,6 +3517,9 @@ int __init omap3xxx_clk_init(void)
 	} else if (cpu_is_ti816x()) {
 		cpu_mask = RATE_IN_TI816X;
 		cpu_clkflg = CK_TI816X;
+	} else if (cpu_is_am33xx()) {
+		cpu_mask = RATE_IN_AM33XX;
+		cpu_clkflg = CK_AM33XX;
 	} else if (cpu_is_omap34xx()) {
 		if (omap_rev() == OMAP3430_REV_ES1_0) {
 			cpu_mask = RATE_IN_3430ES1;
arch/arm/mach-omap2/common.c +21 -0
index 110e5b9..16bac26 100644
@@ -128,6 +128,27 @@ void __init omap2_set_globals_ti816x(void)
 {
 	__omap2_set_globals(&ti816x_globals);
 }
+
+#define AM33XX_TAP_BASE		(AM33XX_CTRL_BASE + \
+				TI816X_CONTROL_DEVICE_ID - 0x204)
+
+static struct omap_globals am33xx_globals = {
+	.class  = AM335X_CLASS,
+	.tap    = AM33XX_L4_WK_IO_ADDRESS(AM33XX_TAP_BASE),
+	.ctrl   = AM33XX_L4_WK_IO_ADDRESS(AM33XX_CTRL_BASE),
+	.prm    = AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE),
+	.cm     = AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE),
+};
+
+void __init omap2_set_globals_am33xx(void)
+{
+	__omap2_set_globals(&am33xx_globals);
+}
+
+void __init am33xx_map_io(void)
+{
+	omapam33xx_map_common_io();
+}
 #endif
 
 #if defined(CONFIG_ARCH_OMAP4)
arch/arm/mach-omap2/id.c +6 -0
index f1784ee..37fe42f 100644
@@ -340,6 +340,10 @@ static void __init omap3_check_revision(const char **cpu_rev)
 			break;
 		}
 		break;
+	case 0xb944:
+		omap_revision = AM335X_REV_ES1_0;
+		*cpu_rev = "1.0";
+		break;
 	default:
 		/* Unknown default to latest silicon rev as default */
 		omap_revision = OMAP3630_REV_ES1_2;
@@ -432,6 +436,8 @@ static void __init omap3_cpuinfo(const char *cpu_rev)
 		cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505";
 	} else if (cpu_is_ti816x()) {
 		cpu_name = "TI816X";
+	} else if (cpu_is_am335x()) {
+		cpu_name =  "AM335X";
 	} else if (omap3_has_iva() && omap3_has_sgx()) {
 		/* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
 		cpu_name = "OMAP3430/3530";
arch/arm/mach-omap2/io.c +24 -0
index da9bc4a..74e84c6 100644
@@ -183,7 +183,24 @@ static struct map_desc omapti816x_io_desc[] __initdata = {
 		.pfn		= __phys_to_pfn(L4_34XX_PHYS),
 		.length		= L4_34XX_SIZE,
 		.type		= MT_DEVICE
+	}
+};
+#endif
+
+#ifdef CONFIG_SOC_OMAPAM33XX
+static struct map_desc omapam33xx_io_desc[] __initdata = {
+	{
+		.virtual	= L4_34XX_VIRT,
+		.pfn		= __phys_to_pfn(L4_34XX_PHYS),
+		.length		= L4_34XX_SIZE,
+		.type		= MT_DEVICE
 	},
+	{
+		.virtual	= L4_WK_AM33XX_VIRT,
+		.pfn		= __phys_to_pfn(L4_WK_AM33XX_PHYS),
+		.length		= L4_WK_AM33XX_SIZE,
+		.type		= MT_DEVICE
+	}
 };
 #endif
 
@@ -270,6 +287,13 @@ void __init omapti816x_map_common_io(void)
 }
 #endif
 
+#ifdef CONFIG_SOC_OMAPAM33XX
+void __init omapam33xx_map_common_io(void)
+{
+	iotable_init(omapam33xx_io_desc, ARRAY_SIZE(omapam33xx_io_desc));
+}
+#endif
+
 #ifdef CONFIG_ARCH_OMAP4
 void __init omap44xx_map_common_io(void)
 {
arch/arm/mach-omap2/serial.c +2 -2
index 0dbd5a2..03fc153 100644
@@ -464,7 +464,7 @@ static void omap_uart_idle_init(struct omap_uart_state *uart)
 		mod_timer(&uart->timer, jiffies + uart->timeout);
 	omap_uart_smart_idle_enable(uart, 0);
 
-	if (cpu_is_omap34xx() && !cpu_is_ti816x()) {
+	if (cpu_is_omap34xx() && !(cpu_is_ti816x() || cpu_is_am33xx())) {
 		u32 mod = (uart->num > 1) ? OMAP3430_PER_MOD : CORE_MOD;
 		u32 wk_mask = 0;
 		u32 padconf = 0;
@@ -828,7 +828,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
 	}
 
 	/* Enable the MDR1 errata for OMAP3 */
-	if (cpu_is_omap34xx() && !cpu_is_ti816x())
+	if (cpu_is_omap34xx() && !(cpu_is_ti816x() || cpu_is_am33xx()))
 		uart->errata |= UART_ERRATA_i202_MDR1_ACCESS;
 }
 
arch/arm/plat-omap/include/plat/am33xx.h new file +25 -0
new file mode 100644
index 0000000..06c19bb
@@ -0,0 +1,25 @@
+/*
+ * This file contains the address info for various AM33XX modules.
+ *
+ * Copyright (C) 2011 Texas Instruments, Inc. - http://www.ti.com/
+ *
+ * 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 version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __ASM_ARCH_AM33XX_H
+#define __ASM_ARCH_AM33XX_H
+
+#define L4_SLOW_AM33XX_BASE	0x48000000
+
+#define AM33XX_SCM_BASE		0x44E10000
+#define AM33XX_CTRL_BASE	AM33XX_SCM_BASE
+#define AM33XX_PRCM_BASE	0x44E00000
+
+#endif /* __ASM_ARCH_AM33XX_H */
arch/arm/plat-omap/include/plat/common.h +2 -0
index 3ff3e36..bb8a6c1 100644
@@ -82,6 +82,7 @@ void omap2_set_globals_243x(void);
 void omap2_set_globals_3xxx(void);
 void omap2_set_globals_443x(void);
 void omap2_set_globals_ti816x(void);
+void omap2_set_globals_am33xx(void);
 
 /* These get called from omap2_set_globals_xxxx(), do not call these */
 void omap2_set_globals_tap(struct omap_globals *);
@@ -92,6 +93,7 @@ void omap2_set_globals_prcm(struct omap_globals *);
 void omap242x_map_io(void);
 void omap243x_map_io(void);
 void omap3_map_io(void);
+void am33xx_map_io(void);
 void omap4_map_io(void);
 
 
arch/arm/plat-omap/include/plat/hardware.h +1 -0
index e87efe1..e6521e1 100644
@@ -287,5 +287,6 @@
 #include <plat/omap34xx.h>
 #include <plat/omap44xx.h>
 #include <plat/ti816x.h>
+#include <plat/am33xx.h>
 
 #endif	/* __ASM_ARCH_OMAP_HARDWARE_H */
arch/arm/plat-omap/include/plat/io.h +20 -0
index 7f2969e..ffed821 100644
@@ -73,6 +73,9 @@
 #define OMAP4_L3_IO_OFFSET	0xb4000000
 #define OMAP4_L3_IO_ADDRESS(pa)	IOMEM((pa) + OMAP4_L3_IO_OFFSET) /* L3 */
 
+#define AM33XX_L4_WK_IO_OFFSET	0xb5000000
+#define AM33XX_L4_WK_IO_ADDRESS(pa)	IOMEM((pa) + AM33XX_L4_WK_IO_OFFSET)
+
 #define OMAP4_L3_PER_IO_OFFSET	0xb1100000
 #define OMAP4_L3_PER_IO_ADDRESS(pa)	IOMEM((pa) + OMAP4_L3_PER_IO_OFFSET)
 
@@ -154,6 +157,15 @@
 #define L4_34XX_SIZE		SZ_4M   /* 1MB of 128MB used, want 1MB sect */
 
 /*
+ * ----------------------------------------------------------------------------
+ * AM33XX specific IO mapping
+ * ----------------------------------------------------------------------------
+ */
+#define L4_WK_AM33XX_PHYS	L4_WK_AM33XX_BASE
+#define L4_WK_AM33XX_VIRT	(L4_WK_AM33XX_PHYS + AM33XX_L4_WK_IO_OFFSET)
+#define L4_WK_AM33XX_SIZE	SZ_4M   /* 1MB of 128MB used, want 1MB sect */
+
+/*
  * Need to look at the Size 4M for L4.
  * VPOM3430 was not working for Int controller
  */
@@ -316,6 +328,14 @@ static inline void omapti816x_map_common_io(void)
 }
 #endif
 
+#ifdef CONFIG_SOC_OMAPAM33XX
+extern void omapam33xx_map_common_io(void);
+#else
+static inline void omapam33xx_map_common_io(void)
+{
+}
+#endif
+
 #ifdef CONFIG_ARCH_OMAP4
 extern void omap44xx_map_common_io(void);
 #else
arch/arm/plat-omap/include/plat/omap34xx.h +2 -0
index b9e8588..0d818ac 100644
@@ -35,6 +35,8 @@
 #define L4_EMU_34XX_BASE	0x54000000
 #define L3_34XX_BASE		0x68000000
 
+#define L4_WK_AM33XX_BASE	0x44C00000
+
 #define OMAP3430_32KSYNCT_BASE	0x48320000
 #define OMAP3430_CM_BASE	0x48004800
 #define OMAP3430_PRM_BASE	0x48306800
arch/arm/plat-omap/io.c +5 -0
index 333871f..14c421a 100644
@@ -94,6 +94,11 @@ void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type)
 	if (cpu_is_ti816x()) {
 		if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE))
 			return XLATE(p, L4_34XX_PHYS, L4_34XX_VIRT);
+	} else if (cpu_is_am33xx()) {
+		if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE))
+			return XLATE(p, L4_34XX_PHYS, L4_34XX_VIRT);
+		if (BETWEEN(p, L4_WK_AM33XX_PHYS, L4_WK_AM33XX_SIZE))
+			return XLATE(p, L4_WK_AM33XX_PHYS, L4_WK_AM33XX_VIRT);
 	} else if (cpu_is_omap34xx()) {
 		if (BETWEEN(p, L3_34XX_PHYS, L3_34XX_SIZE))
 			return XLATE(p, L3_34XX_PHYS, L3_34XX_VIRT);

--
1.7.0.4

maintainer
#172 lore raw

PATCH v5 1/3 arm:omap:am33xx: Update common OMAP machine specific sources

Quoted 5 lines · hvaibhav at ti.com

From: Afzal Mohammed <[email protected]>

This patch updates the common machine specific source files for support for AM33XX/AM335x with cpu type, macros for identification of AM33XX/AM335X device.

Applying this one updated for the map_io and common.h changes, updated patch below. The other two will have to wait a little because of the machine_id dependency.

Regards,

Tony

From: Afzal Mohammed <[email protected]>
Date: Fri, 2 Dec 2011 12:13:22 +0530
Subject: [PATCH] arm:omap:am33xx: Update common OMAP machine specific sources

This patch updates the common machine specific source files for support for AM33XX/AM335x with cpu type, macros for identification of AM33XX/AM335X device.

[tony at atomide.com: updated for map_io and common.h changes]
arch/arm/mach-omap2/clock3xxx_data.c +3 -0
index 5d0064a..c1ab6bc 100644
@@ -3517,6 +3517,9 @@ int __init omap3xxx_clk_init(void)
 	} else if (cpu_is_ti816x()) {
 		cpu_mask = RATE_IN_TI816X;
 		cpu_clkflg = CK_TI816X;
+	} else if (cpu_is_am33xx()) {
+		cpu_mask = RATE_IN_AM33XX;
+		cpu_clkflg = CK_AM33XX;
 	} else if (cpu_is_omap34xx()) {
 		if (omap_rev() == OMAP3430_REV_ES1_0) {
 			cpu_mask = RATE_IN_3430ES1;
arch/arm/mach-omap2/common.c +21 -0
index 684b8a7..c900dcb 100644
@@ -128,6 +128,27 @@ void __init omap2_set_globals_ti816x(void)
 {
 	__omap2_set_globals(&ti816x_globals);
 }
+
+#define AM33XX_TAP_BASE		(AM33XX_CTRL_BASE + \
+				TI816X_CONTROL_DEVICE_ID - 0x204)
+
+static struct omap_globals am33xx_globals = {
+	.class  = AM335X_CLASS,
+	.tap    = AM33XX_L4_WK_IO_ADDRESS(AM33XX_TAP_BASE),
+	.ctrl   = AM33XX_L4_WK_IO_ADDRESS(AM33XX_CTRL_BASE),
+	.prm    = AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE),
+	.cm     = AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE),
+};
+
+void __init omap2_set_globals_am33xx(void)
+{
+	__omap2_set_globals(&am33xx_globals);
+}
+
+void __init am33xx_map_io(void)
+{
+	omapam33xx_map_common_io();
+}
 #endif
 
 #if defined(CONFIG_ARCH_OMAP4)
arch/arm/mach-omap2/common.h +10 -0
index 012bac7..9b733e3 100644
@@ -60,6 +60,14 @@ static inline void omapti816x_map_common_io(void)
 }
 #endif
 
+#ifdef CONFIG_SOC_OMAPAM33XX
+extern void omapam33xx_map_common_io(void);
+#else
+static inline void omapam33xx_map_common_io(void)
+{
+}
+#endif
+
 #ifdef CONFIG_ARCH_OMAP4
 extern void omap44xx_map_common_io(void);
 #else
@@ -107,6 +115,7 @@ void omap2_set_globals_243x(void);
 void omap2_set_globals_3xxx(void);
 void omap2_set_globals_443x(void);
 void omap2_set_globals_ti816x(void);
+void omap2_set_globals_am33xx(void);
 
 /* These get called from omap2_set_globals_xxxx(), do not call these */
 void omap2_set_globals_tap(struct omap_globals *);
@@ -117,6 +126,7 @@ void omap2_set_globals_prcm(struct omap_globals *);
 void omap242x_map_io(void);
 void omap243x_map_io(void);
 void omap3_map_io(void);
+void am33xx_map_io(void);
 void omap4_map_io(void);
 
 /**
arch/arm/mach-omap2/id.c +6 -0
index 27ad722..7ab09f7 100644
@@ -340,6 +340,10 @@ static void __init omap3_check_revision(const char **cpu_rev)
 			break;
 		}
 		break;
+	case 0xb944:
+		omap_revision = AM335X_REV_ES1_0;
+		*cpu_rev = "1.0";
+		break;
 	default:
 		/* Unknown default to latest silicon rev as default */
 		omap_revision = OMAP3630_REV_ES1_2;
@@ -432,6 +436,8 @@ static void __init omap3_cpuinfo(const char *cpu_rev)
 		cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505";
 	} else if (cpu_is_ti816x()) {
 		cpu_name = "TI816X";
+	} else if (cpu_is_am335x()) {
+		cpu_name =  "AM335X";
 	} else if (omap3_has_iva() && omap3_has_sgx()) {
 		/* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
 		cpu_name = "OMAP3430/3530";
arch/arm/mach-omap2/io.c +24 -0
index 3f565dd..088d2ba 100644
@@ -183,7 +183,24 @@ static struct map_desc omapti816x_io_desc[] __initdata = {
 		.pfn		= __phys_to_pfn(L4_34XX_PHYS),
 		.length		= L4_34XX_SIZE,
 		.type		= MT_DEVICE
+	}
+};
+#endif
+
+#ifdef CONFIG_SOC_OMAPAM33XX
+static struct map_desc omapam33xx_io_desc[] __initdata = {
+	{
+		.virtual	= L4_34XX_VIRT,
+		.pfn		= __phys_to_pfn(L4_34XX_PHYS),
+		.length		= L4_34XX_SIZE,
+		.type		= MT_DEVICE
 	},
+	{
+		.virtual	= L4_WK_AM33XX_VIRT,
+		.pfn		= __phys_to_pfn(L4_WK_AM33XX_PHYS),
+		.length		= L4_WK_AM33XX_SIZE,
+		.type		= MT_DEVICE
+	}
 };
 #endif
 
@@ -270,6 +287,13 @@ void __init omapti816x_map_common_io(void)
 }
 #endif
 
+#ifdef CONFIG_SOC_OMAPAM33XX
+void __init omapam33xx_map_common_io(void)
+{
+	iotable_init(omapam33xx_io_desc, ARRAY_SIZE(omapam33xx_io_desc));
+}
+#endif
+
 #ifdef CONFIG_ARCH_OMAP4
 void __init omap44xx_map_common_io(void)
 {
arch/arm/mach-omap2/serial.c +2 -2
index 42c3267..9770c76 100644
@@ -464,7 +464,7 @@ static void omap_uart_idle_init(struct omap_uart_state *uart)
 		mod_timer(&uart->timer, jiffies + uart->timeout);
 	omap_uart_smart_idle_enable(uart, 0);
 
-	if (cpu_is_omap34xx() && !cpu_is_ti816x()) {
+	if (cpu_is_omap34xx() && !(cpu_is_ti816x() || cpu_is_am33xx())) {
 		u32 mod = (uart->num > 1) ? OMAP3430_PER_MOD : CORE_MOD;
 		u32 wk_mask = 0;
 		u32 padconf = 0;
@@ -828,7 +828,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
 	}
 
 	/* Enable the MDR1 errata for OMAP3 */
-	if (cpu_is_omap34xx() && !cpu_is_ti816x())
+	if (cpu_is_omap34xx() && !(cpu_is_ti816x() || cpu_is_am33xx()))
 		uart->errata |= UART_ERRATA_i202_MDR1_ACCESS;
 }
 
arch/arm/plat-omap/include/plat/am33xx.h new file +25 -0
new file mode 100644
index 0000000..06c19bb
@@ -0,0 +1,25 @@
+/*
+ * This file contains the address info for various AM33XX modules.
+ *
+ * Copyright (C) 2011 Texas Instruments, Inc. - http://www.ti.com/
+ *
+ * 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 version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __ASM_ARCH_AM33XX_H
+#define __ASM_ARCH_AM33XX_H
+
+#define L4_SLOW_AM33XX_BASE	0x48000000
+
+#define AM33XX_SCM_BASE		0x44E10000
+#define AM33XX_CTRL_BASE	AM33XX_SCM_BASE
+#define AM33XX_PRCM_BASE	0x44E00000
+
+#endif /* __ASM_ARCH_AM33XX_H */
arch/arm/plat-omap/include/plat/hardware.h +1 -0
index e87efe1..e6521e1 100644
@@ -287,5 +287,6 @@
 #include <plat/omap34xx.h>
 #include <plat/omap44xx.h>
 #include <plat/ti816x.h>
+#include <plat/am33xx.h>
 
 #endif	/* __ASM_ARCH_OMAP_HARDWARE_H */
arch/arm/plat-omap/include/plat/io.h +12 -0
index 1234944..0696bae 100644
@@ -73,6 +73,9 @@
 #define OMAP4_L3_IO_OFFSET	0xb4000000
 #define OMAP4_L3_IO_ADDRESS(pa)	IOMEM((pa) + OMAP4_L3_IO_OFFSET) /* L3 */
 
+#define AM33XX_L4_WK_IO_OFFSET	0xb5000000
+#define AM33XX_L4_WK_IO_ADDRESS(pa)	IOMEM((pa) + AM33XX_L4_WK_IO_OFFSET)
+
 #define OMAP4_L3_PER_IO_OFFSET	0xb1100000
 #define OMAP4_L3_PER_IO_ADDRESS(pa)	IOMEM((pa) + OMAP4_L3_PER_IO_OFFSET)
 
@@ -154,6 +157,15 @@
 #define L4_34XX_SIZE		SZ_4M   /* 1MB of 128MB used, want 1MB sect */
 
 /*
+ * ----------------------------------------------------------------------------
+ * AM33XX specific IO mapping
+ * ----------------------------------------------------------------------------
+ */
+#define L4_WK_AM33XX_PHYS	L4_WK_AM33XX_BASE
+#define L4_WK_AM33XX_VIRT	(L4_WK_AM33XX_PHYS + AM33XX_L4_WK_IO_OFFSET)
+#define L4_WK_AM33XX_SIZE	SZ_4M   /* 1MB of 128MB used, want 1MB sect */
+
+/*
  * Need to look at the Size 4M for L4.
  * VPOM3430 was not working for Int controller
  */
arch/arm/plat-omap/include/plat/omap34xx.h +2 -0
index b9e8588..0d818ac 100644
@@ -35,6 +35,8 @@
 #define L4_EMU_34XX_BASE	0x54000000
 #define L3_34XX_BASE		0x68000000
 
+#define L4_WK_AM33XX_BASE	0x44C00000
+
 #define OMAP3430_32KSYNCT_BASE	0x48320000
 #define OMAP3430_CM_BASE	0x48004800
 #define OMAP3430_PRM_BASE	0x48306800
#173 lore raw

PATCH v5 2/3 arm:omap:am33xx: Add AM335XEVM machine support

From: Afzal Mohammed <[email protected]>

This patch adds minimal support for AM335X EVM. The approach taken here is to add AM335X EVM support to AM3517EVM, considering the fact that with device tree developement we will get rid of board-*.c.

---
 arch/arm/mach-omap2/Kconfig              |    5 +++++
 arch/arm/mach-omap2/Makefile             |    1 +
 arch/arm/mach-omap2/board-am3517evm.c    |   21 +++++++++++++++++++++
 arch/arm/mach-omap2/io.c                 |    7 +++++++
 arch/arm/mach-omap2/timer.c              |    2 ++
 arch/arm/plat-omap/include/plat/common.h |    2 ++
 6 files changed, 38 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/Kconfig +5 -0
index 09ea525..c0e4a70 100644
@@ -326,6 +326,11 @@ config MACH_TI8168EVM
 	depends on SOC_OMAPTI816X
 	default y
 
+config MACH_AM335XEVM
+	bool "AM335X Evaluation Module"
+	depends on SOC_OMAPAM33XX
+	default y
+
 config MACH_OMAP_4430SDP
 	bool "OMAP 4430 SDP board"
 	default y
arch/arm/mach-omap2/Makefile +1 -0
index a12a069..89099a3 100644
@@ -233,6 +233,7 @@ obj-$(CONFIG_MACH_CRANEBOARD)		+= board-am3517crane.o
 
 obj-$(CONFIG_MACH_SBC3530)		+= board-omap3stalker.o
 obj-$(CONFIG_MACH_TI8168EVM)		+= board-ti8168evm.o
+obj-$(CONFIG_MACH_AM335XEVM)		+= board-am3517evm.o
 
 # Platform specific device init code
 
arch/arm/mach-omap2/board-am3517evm.c +21 -0
index f7df8d3..090457f 100644
@@ -516,3 +516,24 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
 	.init_machine	= am3517_evm_init,
 	.timer		= &omap3_timer,
 MACHINE_END
+
+static struct omap_board_config_kernel am335x_evm_config[] __initdata = {
+};
+
+static void __init am335x_evm_init(void)
+{
+	omap_serial_init();
+	omap_sdrc_init(NULL, NULL);
+	omap_board_config = am335x_evm_config;
+	omap_board_config_size = ARRAY_SIZE(am335x_evm_config);
+}
+
+MACHINE_START(AM335XEVM, "am335xevm")
+	/* Maintainer: Texas Instruments */
+	.atag_offset	= 0x100,
+	.map_io		= am33xx_map_io,
+	.init_early	= am33xx_init_early,
+	.init_irq	= ti816x_init_irq,
+	.timer		= &omap3_am33xx_timer,
+	.init_machine	= am335x_evm_init,
+MACHINE_END
arch/arm/mach-omap2/io.c +7 -0
index 74e84c6..e958c04 100644
@@ -460,6 +460,13 @@ void __init ti816x_init_early(void)
 	omap_hwmod_init_postsetup();
 	omap3xxx_clk_init();
 }
+
+void __init am33xx_init_early(void)
+{
+	omap2_set_globals_am33xx();
+	omap_common_init_early();
+	omap3xxx_clk_init();
+}
 #endif
 
 #ifdef CONFIG_ARCH_OMAP4
arch/arm/mach-omap2/timer.c +2 -0
index 037b0d7..7b29197 100644
@@ -333,6 +333,8 @@ OMAP_SYS_TIMER(3)
 OMAP_SYS_TIMER_INIT(3_secure, OMAP3_SECURE_TIMER, OMAP3_CLKEV_SOURCE,
 			2, OMAP3_MPU_SOURCE)
 OMAP_SYS_TIMER(3_secure)
+OMAP_SYS_TIMER_INIT(3_am33xx, 1, OMAP4_MPU_SOURCE, 2, OMAP4_MPU_SOURCE)
+OMAP_SYS_TIMER(3_am33xx)
 #endif
 
 #ifdef CONFIG_ARCH_OMAP4
arch/arm/plat-omap/include/plat/common.h +2 -0
index bb8a6c1..9d7cc3c 100644
@@ -39,6 +39,7 @@ extern struct sys_timer omap1_timer;
 extern struct sys_timer omap2_timer;
 extern struct sys_timer omap3_timer;
 extern struct sys_timer omap3_secure_timer;
+extern struct sys_timer omap3_am33xx_timer;
 extern struct sys_timer omap4_timer;
 extern bool omap_32k_timer_init(void);
 extern int __init omap_init_clocksource_32k(void);
@@ -55,6 +56,7 @@ void omap3_init_early(void);	/* Do not use this one */
 void am35xx_init_early(void);
 void ti816x_init_early(void);
 void omap4430_init_early(void);
+void am33xx_init_early(void);
 
 extern int omap_dss_reset(struct omap_hwmod *);
 

--
1.7.0.4

maintainer
#174 lore raw

PATCH v5 2/3 arm:omap:am33xx: Add AM335XEVM machine support

Hi

Quoted 10 lines · hvaibhav at ti.com

From: Afzal Mohammed <[email protected]>

This patch adds minimal support for AM335X EVM. The approach taken here is to add AM335X EVM support to AM3517EVM, considering the fact that with device tree developement we will get rid of board-*.c.

I realize people may not necessarily like this, but I think that the AM33xx EVM needs its own board file. This is because it really has nothing to do with the AM3517EVM. Also, the AM3517EVM depends on CONFIG_ARCH_OMAP3, but the AM33xx EVM should not: it should depend on either CONFIG_ARCH_OMAPAM33XX, or CONFIG_ARCH_OMAP4.

So the following modification of this patch opts for the former Kconfig option, CONFIG_ARCH_OMAPAM33XX. It also adds a new, minimal board file for the AM33xx EVM.

If, on the other hand, people want to use CONFIG_ARCH_OMAP4 instead for the AM33xx, then we could potentially add the new machine record into board-omap4panda.c. Although even then, if political considerations were set aside, the best technical decision would probably be to create a separate board file, since the boards don't have much in common.

- Paul

From: Afzal Mohammed <[email protected]>
Date: Fri, 2 Dec 2011 12:13:23 +0530
Subject: [PATCH] ARM: OMAP: AM33xx: Add AM335XEVM machine support

This patch adds minimal support for AM335X EVM.

[paul at pwsan.com: created new board file for AM33xx; moved am33xx_init_early()
outside of CONFIG_ARCH_OMAP3; modified commit message]

---
 arch/arm/mach-omap2/Kconfig           |    5 ++++
 arch/arm/mach-omap2/Makefile          |    1 +
 arch/arm/mach-omap2/board-am335xevm.c |   46 +++++++++++++++++++++++++++++++++
 arch/arm/mach-omap2/common.h          |    2 ++
 arch/arm/mach-omap2/io.c              |    8 ++++++
 arch/arm/mach-omap2/timer.c           |    2 ++
 6 files changed, 64 insertions(+)
 create mode 100644 arch/arm/mach-omap2/board-am335xevm.c
arch/arm/mach-omap2/Kconfig +5 -0
index 5ae756a..d5aa936 100644
@@ -335,6 +335,11 @@ config MACH_TI8148EVM
 	depends on SOC_OMAPTI81XX
 	default y
 
+config MACH_AM335XEVM
+	bool "AM335X Evaluation Module"
+	depends on SOC_OMAPAM33XX
+	default y
+
 config MACH_OMAP_4430SDP
 	bool "OMAP 4430 SDP board"
 	default y
arch/arm/mach-omap2/Makefile +1 -0
index c538b3e..d3c33df 100644
@@ -241,6 +241,7 @@ obj-$(CONFIG_MACH_CRANEBOARD)		+= board-am3517crane.o
 obj-$(CONFIG_MACH_SBC3530)		+= board-omap3stalker.o
 obj-$(CONFIG_MACH_TI8168EVM)		+= board-ti8168evm.o
 obj-$(CONFIG_MACH_TI8148EVM)		+= board-ti8168evm.o
+obj-$(CONFIG_MACH_AM335XEVM)		+= board-am335xevm.o
 
 # Platform specific device init code
 
arch/arm/mach-omap2/board-am335xevm.c new file +46 -0

46 lines not on this page · raw message

arch/arm/mach-omap2/common.h +2 -0
index 57da7f4..dae39a3 100644
@@ -83,6 +83,7 @@ extern void omap2_init_common_infrastructure(void);
 extern struct sys_timer omap2_timer;
 extern struct sys_timer omap3_timer;
 extern struct sys_timer omap3_secure_timer;
+extern struct sys_timer omap3_am33xx_timer;
 extern struct sys_timer omap4_timer;
 
 void omap2420_init_early(void);
@@ -94,6 +95,7 @@ void omap3_init_early(void);	/* Do not use this one */
 void am35xx_init_early(void);
 void ti81xx_init_early(void);
 void omap4430_init_early(void);
+void am33xx_init_early(void);
 void omap_prcm_restart(char, const char *);
 
 /*
arch/arm/mach-omap2/io.c +8 -0
index 065bd76..056db56 100644
@@ -466,6 +466,14 @@ void __init ti81xx_init_early(void)
 	omap_hwmod_init_postsetup();
 	omap3xxx_clk_init();
 }
+#endif /* CONFIG_ARCH_OMAP3 */
+
+#ifdef CONFIG_SOC_OMAPAM33XX
+void __init am33xx_init_early(void)
+{
+	omap2_set_globals_am33xx();
+	omap_common_init_early();
+}
 #endif
 
 #ifdef CONFIG_ARCH_OMAP4
arch/arm/mach-omap2/timer.c +2 -0
index c512bac..b2f747b 100644
@@ -321,6 +321,8 @@ OMAP_SYS_TIMER(3)
 OMAP_SYS_TIMER_INIT(3_secure, OMAP3_SECURE_TIMER, OMAP3_CLKEV_SOURCE,
 			2, OMAP3_MPU_SOURCE)
 OMAP_SYS_TIMER(3_secure)
+OMAP_SYS_TIMER_INIT(3_am33xx, 1, OMAP4_MPU_SOURCE, 2, OMAP4_MPU_SOURCE)
+OMAP_SYS_TIMER(3_am33xx)
 #endif
 
 #ifdef CONFIG_ARCH_OMAP4
Signature · 1 line
1.7.10
#175 lore raw

PATCH v5 2/3 arm:omap:am33xx: Add AM335XEVM machine support

Quoted 25 lines · Paul Walmsley

Hi

Quoted 10 lines · hvaibhav at ti.com

From: Afzal Mohammed <[email protected]>

This patch adds minimal support for AM335X EVM. The approach taken here is to add AM335X EVM support to AM3517EVM, considering the fact that with device tree developement we will get rid of board-*.c.

I realize people may not necessarily like this, but I think that the AM33xx EVM needs its own board file. This is because it really has nothing to do with the AM3517EVM. Also, the AM3517EVM depends on CONFIG_ARCH_OMAP3, but the AM33xx EVM should not: it should depend on either CONFIG_ARCH_OMAPAM33XX, or CONFIG_ARCH_OMAP4.

So the following modification of this patch opts for the former Kconfig option, CONFIG_ARCH_OMAPAM33XX. It also adds a new, minimal board file for the AM33xx EVM.

Quoted 7 lines

If, on the other hand, people want to use CONFIG_ARCH_OMAP4 instead for the AM33xx, then we could potentially add the new machine record into board-omap4panda.c. Although even then, if political considerations were set aside, the best technical decision would probably be to create a separate board file, since the boards don't have much in common.

Paul,
I completely agree with all of your comments, let Tony comment and conform on this.
If you go back to history, that was our initial proposal, to create separate Kconfig option for AM33XX.

Tony,

Can you please comment on this discussion? This is very important, since lots of patches (accepted or about to accept) are dependent on this. The early we can conclude on this, early I can rework on the patches and resubmit them.

Thanks,
Vaibhav

Quoted 159 lines

- Paul

From: Afzal Mohammed <[email protected]>
Date: Fri, 2 Dec 2011 12:13:23 +0530
Subject: [PATCH] ARM: OMAP: AM33xx: Add AM335XEVM machine support

This patch adds minimal support for AM335X EVM.

[paul at pwsan.com: created new board file for AM33xx; moved am33xx_init_early()
outside of CONFIG_ARCH_OMAP3; modified commit message]

---
 arch/arm/mach-omap2/Kconfig           |    5 ++++
 arch/arm/mach-omap2/Makefile          |    1 +
 arch/arm/mach-omap2/board-am335xevm.c |   46 +++++++++++++++++++++++++++++++++
 arch/arm/mach-omap2/common.h          |    2 ++
 arch/arm/mach-omap2/io.c              |    8 ++++++
 arch/arm/mach-omap2/timer.c           |    2 ++
 6 files changed, 64 insertions(+)
 create mode 100644 arch/arm/mach-omap2/board-am335xevm.c
arch/arm/mach-omap2/Kconfig +5 -0
index 5ae756a..d5aa936 100644
@@ -335,6 +335,11 @@ config MACH_TI8148EVM
 	depends on SOC_OMAPTI81XX
 	default y
 
+config MACH_AM335XEVM
+	bool "AM335X Evaluation Module"
+	depends on SOC_OMAPAM33XX
+	default y
+
 config MACH_OMAP_4430SDP
 	bool "OMAP 4430 SDP board"
 	default y
arch/arm/mach-omap2/Makefile +1 -0
index c538b3e..d3c33df 100644
@@ -241,6 +241,7 @@ obj-$(CONFIG_MACH_CRANEBOARD)		+= board-am3517crane.o
 obj-$(CONFIG_MACH_SBC3530)		+= board-omap3stalker.o
 obj-$(CONFIG_MACH_TI8168EVM)		+= board-ti8168evm.o
 obj-$(CONFIG_MACH_TI8148EVM)		+= board-ti8168evm.o
+obj-$(CONFIG_MACH_AM335XEVM)		+= board-am335xevm.o
 
 # Platform specific device init code
 
arch/arm/mach-omap2/board-am335xevm.c new file +46 -0
new file mode 100644
index 0000000..324752e
@@ -0,0 +1,46 @@
+/*
+ * board-am335xevm.c - support the TI AM335x EVM board
+ *
+ * Copyright (C) 2011-2012 Texas Instruments, 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 version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+
+#include <mach/hardware.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+
+#include <plat/board.h>
+#include "common.h"
+
+static struct omap_board_config_kernel am335x_evm_config[] __initdata = {
+};
+
+static void __init am335x_evm_init(void)
+{
+	omap_serial_init();
+	omap_sdrc_init(NULL, NULL);
+	omap_board_config = am335x_evm_config;
+	omap_board_config_size = ARRAY_SIZE(am335x_evm_config);
+}
+
+MACHINE_START(AM335XEVM, "am335xevm")
+	/* Maintainer: Texas Instruments */
+	.atag_offset	= 0x100,
+	.map_io		= am33xx_map_io,
+	.init_early	= am33xx_init_early,
+	.init_irq	= ti81xx_init_irq,
+	.timer		= &omap3_am33xx_timer,
+	.init_machine	= am335x_evm_init,
+MACHINE_END
arch/arm/mach-omap2/common.h +2 -0
index 57da7f4..dae39a3 100644
@@ -83,6 +83,7 @@ extern void omap2_init_common_infrastructure(void);
 extern struct sys_timer omap2_timer;
 extern struct sys_timer omap3_timer;
 extern struct sys_timer omap3_secure_timer;
+extern struct sys_timer omap3_am33xx_timer;
 extern struct sys_timer omap4_timer;
 
 void omap2420_init_early(void);
@@ -94,6 +95,7 @@ void omap3_init_early(void);	/* Do not use this one */
 void am35xx_init_early(void);
 void ti81xx_init_early(void);
 void omap4430_init_early(void);
+void am33xx_init_early(void);
 void omap_prcm_restart(char, const char *);
 
 /*
arch/arm/mach-omap2/io.c +8 -0
index 065bd76..056db56 100644
@@ -466,6 +466,14 @@ void __init ti81xx_init_early(void)
 	omap_hwmod_init_postsetup();
 	omap3xxx_clk_init();
 }
+#endif /* CONFIG_ARCH_OMAP3 */
+
+#ifdef CONFIG_SOC_OMAPAM33XX
+void __init am33xx_init_early(void)
+{
+	omap2_set_globals_am33xx();
+	omap_common_init_early();
+}
 #endif
 
 #ifdef CONFIG_ARCH_OMAP4
arch/arm/mach-omap2/timer.c +2 -0
index c512bac..b2f747b 100644
@@ -321,6 +321,8 @@ OMAP_SYS_TIMER(3)
 OMAP_SYS_TIMER_INIT(3_secure, OMAP3_SECURE_TIMER, OMAP3_CLKEV_SOURCE,
 			2, OMAP3_MPU_SOURCE)
 OMAP_SYS_TIMER(3_secure)
+OMAP_SYS_TIMER_INIT(3_am33xx, 1, OMAP4_MPU_SOURCE, 2, OMAP4_MPU_SOURCE)
+OMAP_SYS_TIMER(3_am33xx)
 #endif
 
 #ifdef CONFIG_ARCH_OMAP4
Signature · 1 line
1.7.10
maintainer
#176 lore raw

PATCH v5 2/3 arm:omap:am33xx: Add AM335XEVM machine support

Hi,

Quoted 16 lines · Hiremath, Vaibhav
Quoted 15 lines · Paul Walmsley

Hi

Quoted 10 lines · hvaibhav at ti.com

From: Afzal Mohammed <[email protected]>

This patch adds minimal support for AM335X EVM. The approach taken here is to add AM335X EVM support to AM3517EVM, considering the fact that with device tree developement we will get rid of board-*.c.

Quoted 5 lines
Quoted 5 lines

I realize people may not necessarily like this, but I think that the AM33xx EVM needs its own board file. This is because it really has nothing to do with the AM3517EVM. Also, the AM3517EVM depends on CONFIG_ARCH_OMAP3, but the AM33xx EVM should not: it should depend on either CONFIG_ARCH_OMAPAM33XX, or CONFIG_ARCH_OMAP4.

I guess adding CONFIG_SOC_AM33XX makes sense if it does not share anything except core with omap3. And the SOC is independent of the core selected, there is no dependency between SoC and the core.

Note that we have CONFIG_ARCH_OMAP2PLUS, all the other ones should be just CONFIG_SOC_XXX. As all omap3 omap4 and am33xx are v7, there's no need to compile with different flags either.

Quoted 3 lines
Quoted 3 lines

So the following modification of this patch opts for the former Kconfig option, CONFIG_ARCH_OMAPAM33XX. It also adds a new, minimal board file for the AM33xx EVM.

Sorry, no more new board files. Please make it device tree only then.

Quoted 13 lines
Quoted 7 lines

If, on the other hand, people want to use CONFIG_ARCH_OMAP4 instead for the AM33xx, then we could potentially add the new machine record into board-omap4panda.c. Although even then, if political considerations were set aside, the best technical decision would probably be to create a separate board file, since the boards don't have much in common.

Paul,
I completely agree with all of your comments, let Tony comment and conform on this.
If you go back to history, that was our initial proposal, to create separate Kconfig option for AM33XX.

Quoted 6 lines

Tony,

Can you please comment on this discussion? This is very important, since lots of patches (accepted or about to accept) are dependent on this. The early we can conclude on this, early I can rework on the patches and resubmit them.

Yes, please do. Also note that if this means sprinkling tons of cpu_is_omapxxx all over the code, we need to find a cleaner solution.

Regards,

Tony

#177 lore raw

PATCH v5 2/3 arm:omap:am33xx: Add AM335XEVM machine support

Quoted 25 lines · Tony Lindgren

Hi,

Quoted 16 lines · Hiremath, Vaibhav
Quoted 15 lines · Paul Walmsley

Hi

Quoted 10 lines · hvaibhav at ti.com

From: Afzal Mohammed <[email protected]>

This patch adds minimal support for AM335X EVM. The approach taken here is to add AM335X EVM support to AM3517EVM, considering the fact that with device tree developement we will get rid of board-*.c.

Quoted 5 lines
Quoted 5 lines

I realize people may not necessarily like this, but I think that the AM33xx EVM needs its own board file. This is because it really has nothing to do with the AM3517EVM. Also, the AM3517EVM depends on CONFIG_ARCH_OMAP3, but the AM33xx EVM should not: it should depend on either CONFIG_ARCH_OMAPAM33XX, or CONFIG_ARCH_OMAP4.

Quoted 8 lines

I guess adding CONFIG_SOC_AM33XX makes sense if it does not share anything except core with omap3. And the SOC is independent of the core selected, there is no dependency between SoC and the core.

Note that we have CONFIG_ARCH_OMAP2PLUS, all the other ones should be just CONFIG_SOC_XXX. As all omap3 omap4 and am33xx are v7, there's no need to compile with different flags either.

What about cpu_is_omap34xx() true for am33xx? Should we follow it?

Thanks,
Vaibhav

maintainer
#178 lore raw

PATCH v5 2/3 arm:omap:am33xx: Add AM335XEVM machine support

Quoted 2 lines · Hiremath, Vaibhav

What about cpu_is_omap34xx() true for am33xx? Should we follow it?

Well are there components that could be used as is with that? If not, then it probably does not make sense.

BTW, you should post your patches on top of the clean-up patches Santosh posted as that already leaves out some cpu_is_omapxxxx checks. That's the "ARM: OMAP2+: Misc cleanup" thread.

Regards,

Tony

#179 lore raw

PATCH v5 2/3 arm:omap:am33xx: Add AM335XEVM machine support

Quoted 7 lines · Tony Lindgren
Quoted 2 lines · Hiremath, Vaibhav

What about cpu_is_omap34xx() true for am33xx? Should we follow it?

Well are there components that could be used as is with that? If not, then it probably does not make sense.

I am also in favor of not following cpu_is_omap34xx() for am33xx, but what about ARCH_OMAP? I don't see that you are in agreement in creating ARCH_OMAPAM33XX.
Does it make sense to say that, for am33xx, cpu_is_omap34xx() is false, but still it is under ARCH_OMAP3?

Quoted 4 lines

BTW, you should post your patches on top of the clean-up patches Santosh posted as that already leaves out some cpu_is_omapxxxx checks. That's the "ARM: OMAP2+: Misc cleanup" thread.

Ok. I will do that.

Thanks,
Vaibhav

#180 lore raw

PATCH v5 2/3 arm:omap:am33xx: Add AM335XEVM machine support

In reply to Hiremath, Vaibhav
Quoted 30 lines · Vaibhav
Quoted 29 lines · Tony Lindgren

Hi,

Quoted 16 lines · Hiremath, Vaibhav
Quoted 15 lines · Paul Walmsley

Hi

Quoted 10 lines · On Fri, 2 Dec 2011, [email protected] wrote:

From: Afzal Mohammed <[email protected]>

This patch adds minimal support for AM335X EVM. The approach taken here is to add AM335X EVM support to AM3517EVM, considering the fact that with device tree developement we will get rid of board-*.c.

Quoted 5 lines
Quoted 5 lines

I realize people may not necessarily like this, but I think that the AM33xx EVM needs its own board file. This is because it really has nothing to do with the AM3517EVM. Also, the AM3517EVM depends on CONFIG_ARCH_OMAP3, but the AM33xx EVM should not: it should depend on either CONFIG_ARCH_OMAPAM33XX, or CONFIG_ARCH_OMAP4.

I guess adding CONFIG_SOC_AM33XX makes sense if it does not share anything except core with omap3. And the SOC is independent of the core selected, there is no dependency between SoC and the core.

Quoted 6 lines
Quoted 4 lines

Note that we have CONFIG_ARCH_OMAP2PLUS, all the other ones should be just CONFIG_SOC_XXX. As all omap3 omap4 and am33xx are v7, there's no need to compile with different flags either.

What about cpu_is_omap34xx() true for am33xx? Should we follow it?

Please, no.

I've already demonstrated that that is not necessary and only leads to confusion and maintenance headaches.

Kevin

#181 lore raw

PATCH v5 2/3 arm:omap:am33xx: Add AM335XEVM machine support

Quoted 37 lines · Kevin
Quoted 35 lines · Vaibhav
Quoted 33 lines · Tony Lindgren

Hi,

Quoted 16 lines · Hiremath, Vaibhav
Quoted 15 lines · Paul Walmsley

Hi

Quoted 10 lines · hvaibhav at ti.com

From: Afzal Mohammed <[email protected]>

This patch adds minimal support for AM335X EVM. The approach taken here is to add AM335X EVM support to AM3517EVM, considering the fact that with device tree developement we will get rid of board-*.c.

Quoted 5 lines
Quoted 5 lines

I realize people may not necessarily like this, but I think that the AM33xx EVM needs its own board file. This is because it really has nothing to do with the AM3517EVM. Also, the AM3517EVM depends on CONFIG_ARCH_OMAP3, but the AM33xx EVM should not: it should depend on either CONFIG_ARCH_OMAPAM33XX, or CONFIG_ARCH_OMAP4.

I guess adding CONFIG_SOC_AM33XX makes sense if it does not share anything except core with omap3. And the SOC is independent of the core selected, there is no dependency between SoC and the core.

Note that we have CONFIG_ARCH_OMAP2PLUS, all the other ones should be just CONFIG_SOC_XXX. As all omap3 omap4 and am33xx are v7, there's no need to compile with different flags either.

Quoted 7 lines
Quoted 1 line

What about cpu_is_omap34xx() true for am33xx? Should we follow it?

Please, no.

I've already demonstrated that that is not necessary and only leads to confusion and maintenance headaches.

That's what I was expecting...

Probably last question where I have confusion,

Tony, seems to be against adding new ARCH_OMAPAM33XX, but which _ARCH_ we need to follow for AM33XX? I have to choose between ARCH_OMAP3 or ARCH_OMAP4 and what should I choose
here?

Does it make sense to follow ARCH_OMAPx but not follow cpu_is_omapxxx()? OR
Should we create ARCH_AMXXXX, assuming that all AM devices have similar memory map layout, interrupt mapping, etc...
OR
Should I just add SOC_OMAPAM33XX, wherever required?

Also, there are lot of thing wrapped under ARCH_OMAP3 || ARCH_OMAP4 option, which is required for AM33XX, how should we handle this?

For example,

"arch/arm/plat-omap/include/plat/clock.h"
struct dpll_data {
#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
<dpll related variables>
#endif
};

"arch/arm/mach-omap2/clock.c"

#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)

const struct clkops clkops_omap3_noncore_dpll_ops = { };
const struct clkops clkops_omap3_core_dpll_ops = { }

maintainer
#182 lore raw

PATCH v5 2/3 arm:omap:am33xx: Add AM335XEVM machine support

Quoted 4 lines · Hiremath, Vaibhav

Tony, seems to be against adding new ARCH_OMAPAM33XX, but which _ARCH_ we need to follow for AM33XX? I have to choose between ARCH_OMAP3 or ARCH_OMAP4 and what should I choose
here?

I think you're getting confused now :) I'm against ARCH_XXX but I'm OK with adding SOC_XXX.

We should only need ARCH_OMAP2PLUS + SOC_XXX, there should not be any need to add new ARCH_XXX under mach-omap2. Whatever we have left for ARCH_OMAP in mach-omap2 will be eventually converted to SOC_OMAP.

Quoted 2 lines

Does it make sense to follow ARCH_OMAPx but not follow cpu_is_omapxxx()? OR

No

Quoted 1 line

Should we create ARCH_AMXXXX, assuming that all AM devices have similar

No

Quoted 3 lines

memory map layout, interrupt mapping, etc... OR
Should I just add SOC_OMAPAM33XX, wherever required?

Yes, but how about just use SOC_AM33XX?

Quoted 11 lines

Also, there are lot of thing wrapped under ARCH_OMAP3 || ARCH_OMAP4 option, which is required for AM33XX, how should we handle this?

For example,

"arch/arm/plat-omap/include/plat/clock.h"
struct dpll_data {
#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
<dpll related variables>
#endif
};

Quoted 8 lines

"arch/arm/mach-omap2/clock.c"

#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)

const struct clkops clkops_omap3_noncore_dpll_ops = { };
const struct clkops clkops_omap3_core_dpll_ops = { }

I suggest doing some clean-up patches before adding SOC_AM33XX where you just convert those to be

#if defined(CONFIG_ARCH_OMAP2PLUS) && !defined(CONFIG_ARCH_OMAP2)

or something similar depending if they already are inside mach-omap2 directory. This will make them future proof for adding new SoCs without having to patch all over the place.

Regards,

Tony

#183 lore raw

PATCH v5 2/3 arm:omap:am33xx: Add AM335XEVM machine support

Quoted 20 lines · Tony Lindgren
Quoted 4 lines · Hiremath, Vaibhav

Tony, seems to be against adding new ARCH_OMAPAM33XX, but which _ARCH_ we need to follow for AM33XX? I have to choose between ARCH_OMAP3 or ARCH_OMAP4 and what should I choose
here?

I think you're getting confused now :) I'm against ARCH_XXX but I'm OK with adding SOC_XXX.

We should only need ARCH_OMAP2PLUS + SOC_XXX, there should not be any need to add new ARCH_XXX under mach-omap2. Whatever we have left for ARCH_OMAP in mach-omap2 will be eventually converted to SOC_OMAP.

Quoted 2 lines

Does it make sense to follow ARCH_OMAPx but not follow cpu_is_omapxxx()? OR

No

Quoted 1 line

Should we create ARCH_AMXXXX, assuming that all AM devices have similar

Quoted 8 lines

No

Quoted 3 lines

memory map layout, interrupt mapping, etc... OR
Should I just add SOC_OMAPAM33XX, wherever required?

Yes, but how about just use SOC_AM33XX?

I will submit patches shortly (in the last cleanup now), where for am33xx

- cpu_is_omap34xx() will be false.

- Only cpu_is_am33xx() will be true here.

- Neither be under ARCH_OMAP3 nor ARCH_OMAP4, instead will be an independent device under SOC_OMAPAM33XX.

This brings-in, some cleanup in existing code, which I will also submit shortly.

Quoted 20 lines
Quoted 11 lines

Also, there are lot of thing wrapped under ARCH_OMAP3 || ARCH_OMAP4 option, which is required for AM33XX, how should we handle this?

For example,

"arch/arm/plat-omap/include/plat/clock.h"
struct dpll_data {
#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
<dpll related variables>
#endif
};

Quoted 8 lines

"arch/arm/mach-omap2/clock.c"

#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)

const struct clkops clkops_omap3_noncore_dpll_ops = { };
const struct clkops clkops_omap3_core_dpll_ops = { }

Quoted 9 lines

I suggest doing some clean-up patches before adding SOC_AM33XX where you just convert those to be

#if defined(CONFIG_ARCH_OMAP2PLUS) && !defined(CONFIG_ARCH_OMAP2)

or something similar depending if they already are inside mach-omap2 directory. This will make them future proof for adding new SoCs without having to patch all over the place.

Tony,

Cool, I also thought exactly same solution on this, but next thought came to my mind was, it won't scale up, since we still have dependency on ARCH_OMAP2 option. However, it will be a good temporary solution for our problem, lets review them first (I will submit shortly).

Thanks,
Vaibhav

maintainer
#184 lore raw

PATCH v5 2/3 arm:omap:am33xx: Add AM335XEVM machine support

Quoted 10 lines · Hiremath, Vaibhav
Quoted 9 lines · Tony Lindgren

I suggest doing some clean-up patches before adding SOC_AM33XX where you just convert those to be

#if defined(CONFIG_ARCH_OMAP2PLUS) && !defined(CONFIG_ARCH_OMAP2)

or something similar depending if they already are inside mach-omap2 directory. This will make them future proof for adding new SoCs without having to patch all over the place.

BTW, just noticied that the above won't work the right way in the multi-omap case when all of them are compiled in..

Quoted 4 lines

Cool, I also thought exactly same solution on this, but next thought came to my mind was, it won't scale up, since we still have dependency on ARCH_OMAP2 option. However, it will be a good temporary solution for our problem, lets review them first (I will submit shortly).

..so probably the best way to deal with that is with the additional CONFIG_SOC_OMAP3PLUS and CONFIG_SOC_OMAP4PLUS options that I posted at:

http://www.mail-archive.com/linux-omap at vger.kernel.org/msg67938.html

Can you please take a look and see how that works for am33xx?

Regards,

Tony

#185 lore raw

PATCH v5 2/3 arm:omap:am33xx: Add AM335XEVM machine support

Quoted 20 lines · Tony Lindgren
Quoted 10 lines · Hiremath, Vaibhav
Quoted 9 lines · Tony Lindgren

I suggest doing some clean-up patches before adding SOC_AM33XX where you just convert those to be

#if defined(CONFIG_ARCH_OMAP2PLUS) && !defined(CONFIG_ARCH_OMAP2)

or something similar depending if they already are inside mach-omap2 directory. This will make them future proof for adding new SoCs without having to patch all over the place.

BTW, just noticied that the above won't work the right way in the multi-omap case when all of them are compiled in..

Quoted 4 lines

Cool, I also thought exactly same solution on this, but next thought came to my mind was, it won't scale up, since we still have dependency on ARCH_OMAP2 option. However, it will be a good temporary solution for our problem, lets review them first (I will submit shortly).

Quoted 8 lines

..so probably the best way to deal with that is with the additional CONFIG_SOC_OMAP3PLUS and CONFIG_SOC_OMAP4PLUS options that I posted at:

http://www.mail-archive.com/linux-omap at vger.kernel.org/msg67938.html

Can you please take a look and see how that works for am33xx?

I still don't understand, how this will help am33xx, and for that matter any new future devices based on cortex-a8 or a9 core, but not omap exactly families?
As I said earlier, am33xx doesn't fall under either omap3 or omap4; we have again same question in front of us, which to follow, either omap3 or omap4??

What is the thought process of creating these config options? Isn't it same as just replacing ARCH_OMAP3/4 with SOC_OMAP3PLUS and SOC_OMAP4PLUS? What is the criteria for the device to get into this umbrella?

Thanks,
Vaibhav

maintainer
#186 lore raw

PATCH v5 2/3 arm:omap:am33xx: Add AM335XEVM machine support

Quoted 36 lines · Hiremath, Vaibhav
Quoted 20 lines · Tony Lindgren
Quoted 10 lines · Hiremath, Vaibhav
Quoted 9 lines · Tony Lindgren

I suggest doing some clean-up patches before adding SOC_AM33XX where you just convert those to be

#if defined(CONFIG_ARCH_OMAP2PLUS) && !defined(CONFIG_ARCH_OMAP2)

or something similar depending if they already are inside mach-omap2 directory. This will make them future proof for adding new SoCs without having to patch all over the place.

BTW, just noticied that the above won't work the right way in the multi-omap case when all of them are compiled in..

Quoted 4 lines

Cool, I also thought exactly same solution on this, but next thought came to my mind was, it won't scale up, since we still have dependency on ARCH_OMAP2 option. However, it will be a good temporary solution for our problem, lets review them first (I will submit shortly).

Quoted 8 lines

..so probably the best way to deal with that is with the additional CONFIG_SOC_OMAP3PLUS and CONFIG_SOC_OMAP4PLUS options that I posted at:

http://www.mail-archive.com/linux-omap at vger.kernel.org/msg67938.html

Can you please take a look and see how that works for am33xx?

I still don't understand, how this will help am33xx, and for that matter any new future devices based on cortex-a8 or a9 core, but not omap exactly families?
As I said earlier, am33xx doesn't fall under either omap3 or omap4; we have again same question in front of us, which to follow, either omap3 or omap4??

Quoted 3 lines

What is the thought process of creating these config options? Isn't it same as just replacing ARCH_OMAP3/4 with SOC_OMAP3PLUS and SOC_OMAP4PLUS? What is the criteria for the device to get into this umbrella?

Just to recap: As we've discussed elsewhere, these new options need to be finer grained SOC_HAS_OMAPXYZ_ABC type options like you've already posted.

Tony

#187 lore raw

PATCH v5 2/3 arm:omap:am33xx: Add AM335XEVM machine support

Quoted 37 lines · Tony Lindgren
Quoted 36 lines · Hiremath, Vaibhav
Quoted 20 lines · Tony Lindgren
Quoted 10 lines · Hiremath, Vaibhav
Quoted 9 lines · Tony Lindgren

I suggest doing some clean-up patches before adding SOC_AM33XX where you just convert those to be

#if defined(CONFIG_ARCH_OMAP2PLUS) && !defined(CONFIG_ARCH_OMAP2)

or something similar depending if they already are inside mach-omap2 directory. This will make them future proof for adding new SoCs without having to patch all over the place.

BTW, just noticied that the above won't work the right way in the multi-omap case when all of them are compiled in..

Quoted 4 lines

Cool, I also thought exactly same solution on this, but next thought came to my mind was, it won't scale up, since we still have dependency on ARCH_OMAP2 option. However, it will be a good temporary solution for our problem, lets review them first (I will submit shortly).

Quoted 8 lines

..so probably the best way to deal with that is with the additional CONFIG_SOC_OMAP3PLUS and CONFIG_SOC_OMAP4PLUS options that I posted at:

http://www.mail-archive.com/linux-omap at vger.kernel.org/msg67938.html

Can you please take a look and see how that works for am33xx?

I still don't understand, how this will help am33xx, and for that matter any new future devices based on cortex-a8 or a9 core, but not omap exactly families?
As I said earlier, am33xx doesn't fall under either omap3 or omap4; we have again same question in front of us, which to follow, either omap3 or omap4??

Quoted 7 lines
Quoted 3 lines

What is the thought process of creating these config options? Isn't it same as just replacing ARCH_OMAP3/4 with SOC_OMAP3PLUS and SOC_OMAP4PLUS? What is the criteria for the device to get into this umbrella?

Just to recap: As we've discussed elsewhere, these new options need to be finer grained SOC_HAS_OMAPXYZ_ABC type options like you've already posted.

Absolutely... I will be submitting machine and low-level early printk patch Based on this only.

Thanks,
Vaibhav

#188 lore raw

PATCH v5 2/3 arm:omap:am33xx: Add AM335XEVM machine support

In reply to Tony Lindgren
Quoted 25 lines · Tony Lindgren

Hi,

Quoted 16 lines · Hiremath, Vaibhav
Quoted 15 lines · Paul Walmsley

Hi

Quoted 10 lines · hvaibhav at ti.com

From: Afzal Mohammed <[email protected]>

This patch adds minimal support for AM335X EVM. The approach taken here is to add AM335X EVM support to AM3517EVM, considering the fact that with device tree developement we will get rid of board-*.c.

Quoted 5 lines
Quoted 5 lines

I realize people may not necessarily like this, but I think that the AM33xx EVM needs its own board file. This is because it really has nothing to do with the AM3517EVM. Also, the AM3517EVM depends on CONFIG_ARCH_OMAP3, but the AM33xx EVM should not: it should depend on either CONFIG_ARCH_OMAPAM33XX, or CONFIG_ARCH_OMAP4.

Quoted 8 lines

I guess adding CONFIG_SOC_AM33XX makes sense if it does not share anything except core with omap3. And the SOC is independent of the core selected, there is no dependency between SoC and the core.

Note that we have CONFIG_ARCH_OMAP2PLUS, all the other ones should be just CONFIG_SOC_XXX. As all omap3 omap4 and am33xx are v7, there's no need to compile with different flags either.

But still we do have ARCH_OMAP2, ARCH_OMAP3 and ARCH_OMAP4? And that's where, we have issues for adding new devices like AM33xx and TI81xx.

Thanks,
Vaibhav

maintainer
#189 lore raw

PATCH v5 2/3 arm:omap:am33xx: Add AM335XEVM machine support

Quoted 30 lines · Hiremath, Vaibhav
Quoted 29 lines · Tony Lindgren

Hi,

Quoted 16 lines · Hiremath, Vaibhav
Quoted 15 lines · Paul Walmsley

Hi

Quoted 10 lines · hvaibhav at ti.com

From: Afzal Mohammed <[email protected]>

This patch adds minimal support for AM335X EVM. The approach taken here is to add AM335X EVM support to AM3517EVM, considering the fact that with device tree developement we will get rid of board-*.c.

Quoted 5 lines
Quoted 5 lines

I realize people may not necessarily like this, but I think that the AM33xx EVM needs its own board file. This is because it really has nothing to do with the AM3517EVM. Also, the AM3517EVM depends on CONFIG_ARCH_OMAP3, but the AM33xx EVM should not: it should depend on either CONFIG_ARCH_OMAPAM33XX, or CONFIG_ARCH_OMAP4.

I guess adding CONFIG_SOC_AM33XX makes sense if it does not share anything except core with omap3. And the SOC is independent of the core selected, there is no dependency between SoC and the core.

Quoted 7 lines
Quoted 4 lines

Note that we have CONFIG_ARCH_OMAP2PLUS, all the other ones should be just CONFIG_SOC_XXX. As all omap3 omap4 and am33xx are v7, there's no need to compile with different flags either.

But still we do have ARCH_OMAP2, ARCH_OMAP3 and ARCH_OMAP4? And that's where, we have issues for adding new devices like AM33xx and TI81xx.

Those will be going away, but doing it has not been done because of the amount of churn it creates. But if we add #define CONFIG_ARCH_OMAP3 CONFIG_SOC_OMAP3 we can do it piecemeal along with other cleanups.

Tony

#190 lore raw

cover ARM: OMAP2+: Add command line parameter for debugSS module control

From: Vaibhav Hiremath <[email protected]>

Currently there is no clean mechanism to control debugSS module and you have to always keep clocks enabled, either,

- By enabling it during boot as part of clk_init function (post common-clock migration).
Or
- By having HWMOD_INIT_NO_IDLE flag in hwmod data (Joel submitted patch for AM335x earlier).

Based on the discussion with Kevin H,
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg81771.html

This patch introduces new kernel parameter "omap_debugss_en", which will allow user to control debugSS module enable/disable part during boot-time.

In case of OMAP3, the debugSS is part of EMU domain and is currently controlled by clock tree alone.

In case of OMAP4, the debugSS is part of EMU domain and is currently controlled by clock tree, as MODULEMODE_SWCTRL is not defined for hwmod.

In case of AM335x, the debugSS is in wakeup domain and is currently controlled through hwmod alone. Currently we keep it always enabled.

Testing:
- Tested on AM335x based EVM and BeagleBone platform

As required, without this flag the debugSS module will be disabled during kernel boot.

OMAP (2/3/4) may require some changes from clock/hwmod perspective in order to use this new parameter.
I am still looking into OMAP spec and this RFC version of patch-series is to get comments or opinion from list.

Vaibhav Hiremath (3):
ARM: AM33XX: clock: Add debugSS clock nodes to clock tree
ARM: AM33XX: hwmod: Add hwmod data for debugSS
ARM: OMAP2+: Add command line parameter for debugSS module control

 Documentation/kernel-parameters.txt        |    3 +
 arch/arm/mach-omap2/Makefile               |    2 +-
 arch/arm/mach-omap2/cclock33xx_data.c      |   47 +++++++++++++++--
 arch/arm/mach-omap2/debugss.c              |   80 ++++++++++++++++++++++++++++
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c |   69 ++++++++++++++++--------
 5 files changed, 173 insertions(+), 28 deletions(-)
 create mode 100644 arch/arm/mach-omap2/debugss.c
#191 lore raw

cover ARM: OMAP2+: Add command line parameter for debugSS module control

Quoted 55 lines

-----Original Message-----
From: Hiremath, Vaibhav
Sent: Monday, March 04, 2013 5:06 PM
To: linux-omap at vger.kernel.org
Cc: tony at atomide.com; khilman at linaro.org; paul at pwsan.com; Nayak, Rajendra; linux-arm-kernel at lists.infradead.org; Hiremath, Vaibhav
Subject: [RFC PATCH 0/3] ARM: OMAP2+: Add command line parameter for debugSS module control

From: Vaibhav Hiremath <[email protected]>

Currently there is no clean mechanism to control debugSS module and you have to always keep clocks enabled, either,

- By enabling it during boot as part of clk_init function (post common-clock migration).
Or
- By having HWMOD_INIT_NO_IDLE flag in hwmod data (Joel submitted patch for AM335x earlier).

Based on the discussion with Kevin H,
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg81771.html

This patch introduces new kernel parameter "omap_debugss_en", which will allow user to control debugSS module enable/disable part during boot-time.

In case of OMAP3, the debugSS is part of EMU domain and is currently controlled by clock tree alone.

In case of OMAP4, the debugSS is part of EMU domain and is currently controlled by clock tree, as MODULEMODE_SWCTRL is not defined for hwmod.

In case of AM335x, the debugSS is in wakeup domain and is currently controlled through hwmod alone. Currently we keep it always enabled.

Testing:
- Tested on AM335x based EVM and BeagleBone platform

As required, without this flag the debugSS module will be
disabled
during kernel boot.

OMAP (2/3/4) may require some changes from clock/hwmod perspective in order to use this new parameter.
I am still looking into OMAP spec and this RFC version of patch-series is to get comments or opinion from list.

Vaibhav Hiremath (3):
ARM: AM33XX: clock: Add debugSS clock nodes to clock tree
ARM: AM33XX: hwmod: Add hwmod data for debugSS
ARM: OMAP2+: Add command line parameter for debugSS module control

Quoted 9 lines
 Documentation/kernel-parameters.txt        |    3 +
 arch/arm/mach-omap2/Makefile               |    2 +-
 arch/arm/mach-omap2/cclock33xx_data.c      |   47 +++++++++++++++--
 arch/arm/mach-omap2/debugss.c              |   80
++++++++++++++++++++++++++++
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c |   69 ++++++++++++++++----
----
 5 files changed, 173 insertions(+), 28 deletions(-)
 create mode 100644 arch/arm/mach-omap2/debugss.c

Kevin/Tony,

Any comments or input on this patch series?

Thanks,
Vaibhav

maintainer
#192 lore raw

cover ARM: OMAP2+: Add command line parameter for debugSS module control

Quoted 8 lines · Hiremath, Vaibhav
Quoted 8 lines

From: Hiremath, Vaibhav
This patch introduces new kernel parameter "omap_debugss_en", which will allow user to control debugSS module enable/disable part during boot-time.

In case of OMAP3, the debugSS is part of EMU domain and is currently controlled by clock tree alone.

Quoted 8 lines
Quoted 6 lines

In case of OMAP4, the debugSS is part of EMU domain and is currently controlled by clock tree, as MODULEMODE_SWCTRL is not defined for hwmod.

In case of AM335x, the debugSS is in wakeup domain and is currently controlled through hwmod alone. Currently we keep it always enabled.

Any comments or input on this patch series?

No comments on adding the clocks, but the enabling of them should be just a regular device driver.

Regards,

Tony

#193 lore raw

cover ARM: OMAP2+: Add command line parameter for debugSS module control

Quoted 23 lines

-----Original Message-----
From: Tony Lindgren [mailto:tony at atomide.com]
Sent: Monday, April 08, 2013 11:01 PM
To: Hiremath, Vaibhav
Cc: linux-omap at vger.kernel.org; khilman at linaro.org; paul at pwsan.com; Nayak, Rajendra; linux-arm-kernel at lists.infradead.org
Subject: Re: [RFC PATCH 0/3] ARM: OMAP2+: Add command line parameter for debugSS module control

Quoted 12 lines · Hiremath, Vaibhav
Quoted 12 lines

From: Hiremath, Vaibhav
This patch introduces new kernel parameter "omap_debugss_en", which will allow user to control debugSS module enable/disable part during boot-time.

In case of OMAP3, the debugSS is part of EMU domain and is currently controlled by clock tree alone.

In case of OMAP4, the debugSS is part of EMU domain and is currently controlled by clock tree, as MODULEMODE_SWCTRL is not defined for hwmod.

Quoted 9 lines
Quoted 2 lines
Quoted 2 lines

In case of AM335x, the debugSS is in wakeup domain and is currently controlled through hwmod alone. Currently we keep it always

enabled.

Quoted 2 lines

Any comments or input on this patch series?

No comments on adding the clocks, but the enabling of them should be just a regular device driver.

Thanks for review, on this patch I will add your Reviewed-by line on next version Of the patch-series.

I have just responded my comment to the other mail on this, and based on Your response we can conclude.

Thanks,
Vaibhav
.

#194 lore raw

RFC PATCH 1/3 ARM: AM33XX: clock: Add debugSS clock nodes to clock tree

From: Vaibhav Hiremath <[email protected]>

Represent debugSS clock interface as provided in CM_WKUP_DEBUGSS_CLKCTRL register, which includes,
- Clock gate for optional DEBUG_CLKA and DBGSYSCLK
- Clock Mux for TRC_PMD and STM_PMD
- Clock divider for STM and TPIU

Cc Kevin Hilman <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Rajendra Nayak <[email protected]>
---
 arch/arm/mach-omap2/cclock33xx_data.c |   47 +++++++++++++++++++++++++++++---
 1 files changed, 42 insertions(+), 5 deletions(-)
arch/arm/mach-omap2/cclock33xx_data.c +42 -5
index 3d5a0e5..12db88c 100644
@@ -422,15 +422,11 @@ DEFINE_STRUCT_CLK(smartreflex1_fck, dpll_core_ck_parents, clk_ops_null);
  *  - Driver code is not yet migrated to use hwmod/runtime pm
  *  - Modules outside kernel access (to disable them by default)
  *
- *     - debugss
  *     - mmu (gfx domain)
  *     - cefuse
  *     - usbotg_fck (its additional clock and not really a modulemode)
  *     - ieee5000
  */
-DEFINE_CLK_GATE(debugss_ick, "dpll_core_m4_ck", &dpll_core_m4_ck, 0x0,
-		AM33XX_CM_WKUP_DEBUGSS_CLKCTRL, AM33XX_MODULEMODE_SWCTRL_SHIFT,
-		0x0, NULL);
 
 DEFINE_CLK_GATE(mmu_fck, "dpll_core_m4_ck", &dpll_core_m4_ck, 0x0,
 		AM33XX_CM_GFX_MMUDATA_CLKCTRL, AM33XX_MODULEMODE_SWCTRL_SHIFT,
@@ -833,6 +829,42 @@ static struct clk_hw_omap wdt1_fck_hw = {
 DEFINE_STRUCT_CLK(wdt1_fck, wdt_ck_parents, gpio_fck_ops);
 
 /*
+ * debugss optional clocks
+ */
+DEFINE_CLK_GATE(dbg_sysclk_ck, "sys_clkin_ck", &sys_clkin_ck,
+		0x0, AM33XX_CM_WKUP_DEBUGSS_CLKCTRL,
+		AM33XX_OPTFCLKEN_DBGSYSCLK_SHIFT, 0x0, NULL);
+
+DEFINE_CLK_GATE(dbg_clka_ck, "dpll_core_m4_ck", &dpll_core_m4_ck,
+		0x0, AM33XX_CM_WKUP_DEBUGSS_CLKCTRL,
+		AM33XX_OPTCLK_DEBUG_CLKA_SHIFT, 0x0, NULL);
+
+static const char *stm_pmd_clock_mux_ck_parents[] = {
+	"dbg_sysclk_ck", "dbg_clka_ck",
+};
+
+DEFINE_CLK_MUX(stm_pmd_clock_mux_ck, stm_pmd_clock_mux_ck_parents, NULL, 0x0,
+	       AM33XX_CM_WKUP_DEBUGSS_CLKCTRL, AM33XX_STM_PMD_CLKSEL_SHIFT,
+	       AM33XX_STM_PMD_CLKSEL_WIDTH, 0x0, NULL);
+
+DEFINE_CLK_MUX(trace_pmd_clk_mux_ck, stm_pmd_clock_mux_ck_parents, NULL, 0x0,
+	       AM33XX_CM_WKUP_DEBUGSS_CLKCTRL,
+	       AM33XX_TRC_PMD_CLKSEL_SHIFT,
+	       AM33XX_TRC_PMD_CLKSEL_WIDTH, 0x0, NULL);
+
+DEFINE_CLK_DIVIDER(stm_clk_div_ck, "stm_pmd_clock_mux_ck",
+		   &stm_pmd_clock_mux_ck, 0x0, AM33XX_CM_WKUP_DEBUGSS_CLKCTRL,
+		   AM33XX_STM_PMD_CLKDIVSEL_SHIFT,
+		   AM33XX_STM_PMD_CLKDIVSEL_WIDTH, CLK_DIVIDER_POWER_OF_TWO,
+		   NULL);
+
+DEFINE_CLK_DIVIDER(trace_clk_div_ck, "trace_pmd_clk_mux_ck",
+		   &trace_pmd_clk_mux_ck, 0x0, AM33XX_CM_WKUP_DEBUGSS_CLKCTRL,
+		   AM33XX_TRC_PMD_CLKDIVSEL_SHIFT,
+		   AM33XX_TRC_PMD_CLKDIVSEL_WIDTH, CLK_DIVIDER_POWER_OF_TWO,
+		   NULL);
+
+/*
  * clkdev
  */
 static struct omap_clk am33xx_clks[] = {
@@ -869,7 +901,6 @@ static struct omap_clk am33xx_clks[] = {
 	CLK("481cc000.d_can",	NULL,		&dcan0_fck,	CK_AM33XX),
 	CLK(NULL,	"dcan1_fck",		&dcan1_fck,	CK_AM33XX),
 	CLK("481d0000.d_can",	NULL,		&dcan1_fck,	CK_AM33XX),
-	CLK(NULL,	"debugss_ick",		&debugss_ick,	CK_AM33XX),
 	CLK(NULL,	"pruss_ocp_gclk",	&pruss_ocp_gclk,	CK_AM33XX),
 	CLK(NULL,	"mcasp0_fck",		&mcasp0_fck,	CK_AM33XX),
 	CLK(NULL,	"mcasp1_fck",		&mcasp1_fck,	CK_AM33XX),
@@ -910,6 +941,12 @@ static struct omap_clk am33xx_clks[] = {
 	CLK(NULL,	"clkout2_div_ck",	&clkout2_div_ck,	CK_AM33XX),
 	CLK(NULL,	"timer_32k_ck",		&clkdiv32k_ick,	CK_AM33XX),
 	CLK(NULL,	"timer_sys_ck",		&sys_clkin_ck,	CK_AM33XX),
+	CLK(NULL,	"dbg_sysclk_ck",	&dbg_sysclk_ck,	CK_AM33XX),
+	CLK(NULL,	"dbg_clka_ck",		&dbg_clka_ck,	CK_AM33XX),
+	CLK(NULL,	"stm_pmd_clock_mux_ck",	&stm_pmd_clock_mux_ck,	CK_AM33XX),
+	CLK(NULL,	"trace_pmd_clk_mux_ck",	&trace_pmd_clk_mux_ck,	CK_AM33XX),
+	CLK(NULL,	"stm_clk_div_ck",	&stm_clk_div_ck,	CK_AM33XX),
+	CLK(NULL,	"trace_clk_div_ck",	&trace_clk_div_ck,	CK_AM33XX),
 };
 
 

--
1.7.0.4

maintainer
#195 lore raw

RFC PATCH 1/3 ARM: AM33XX: clock: Add debugSS clock nodes to clock tree

Quoted 8 lines · hvaibhav at ti.com

From: Vaibhav Hiremath <[email protected]>

Represent debugSS clock interface as provided in CM_WKUP_DEBUGSS_CLKCTRL register, which includes,
- Clock gate for optional DEBUG_CLKA and DBGSYSCLK
- Clock Mux for TRC_PMD and STM_PMD
- Clock divider for STM and TPIU

Quoted 5 lines
Cc Kevin Hilman <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Rajendra Nayak <[email protected]>

based on a quick glance.

- Paul

#196 lore raw

RFC PATCH 3/3 ARM: OMAP2+: Add command line parameter for debugSS module control

From: Vaibhav Hiremath <[email protected]>

Currently there is no clean mechanism to control debugSS module and you have to always keep clocks enabled, either,

- By enabling it during boot as part of clk_init function. Or
- By having HWMOD_INIT_NO_IDLE flag in hwmod data.

Based on the discussion,
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg81771.html

This patch introduces new kernel parameter "omap_debugss_en", which will allow user to control debugSS module enable/disable part during boot-time.

Cc Kevin Hilman <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Tony Lindgren <[email protected]>

---
Tested on
- AM335x based EVM and BeagleBone platforms

 Documentation/kernel-parameters.txt |    3 +
 arch/arm/mach-omap2/Makefile        |    2 +-
 arch/arm/mach-omap2/debugss.c       |   80 +++++++++++++++++++++++++++++++++++
 3 files changed, 84 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-omap2/debugss.c
Documentation/kernel-parameters.txt +3 -0
index 6c72381..bf1c822 100644
@@ -2051,6 +2051,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			For example, to override I2C bus2:
 			omap_mux=i2c2_scl.i2c2_scl=0x100,i2c2_sda.i2c2_sda=0x100
 
+	omap_debugss_en	[OMAP] Enable Debug Sub-System module required
+			for JTAG debugging.
+
 	oprofile.timer=	[HW]
 			Use timer interrupt instead of performance counters
 
arch/arm/mach-omap2/Makefile +1 -1
index d1156cf..aaf5cc2 100644
@@ -5,7 +5,7 @@
 # Common support
 obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \
 	 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
-	 omap_device.o sram.o
+	 omap_device.o sram.o debugss.o
 
 omap-2-3-common				= irq.o
 hwmod-common				= omap_hwmod.o \
arch/arm/mach-omap2/debugss.c new file +80 -0

80 lines not on this page · raw message

--
1.7.0.4

maintainer
#197 lore raw

RFC PATCH v5 3/3 ARM: OMAP2+: Add command line parameter for debugSS module control

Hi,

Quoted 9 lines · hvaibhav at ti.com

From: Vaibhav Hiremath <[email protected]>

Currently there is no clean mechanism to control debugSS module and you have to always keep clocks enabled, either,

- By enabling it during boot as part of clk_init function. Or
- By having HWMOD_INIT_NO_IDLE flag in hwmod data.

Quoted 6 lines

Based on the discussion,
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg81771.html

This patch introduces new kernel parameter "omap_debugss_en", which will allow user to control debugSS module enable/disable part during boot-time.

I suggest you just make this part into a standard DT only device driver. That way the command line parsing and clock enabling can happen the normal way.

Is there any reason why this could not be a loadable module?

Regards,

Tony

Quoted 130 lines
Cc Kevin Hilman <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Tony Lindgren <[email protected]>

---
Tested on
- AM335x based EVM and BeagleBone platforms

 Documentation/kernel-parameters.txt |    3 +
 arch/arm/mach-omap2/Makefile        |    2 +-
 arch/arm/mach-omap2/debugss.c       |   80 +++++++++++++++++++++++++++++++++++
 3 files changed, 84 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-omap2/debugss.c
Documentation/kernel-parameters.txt +3 -0
index 6c72381..bf1c822 100644
@@ -2051,6 +2051,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			For example, to override I2C bus2:
 			omap_mux=i2c2_scl.i2c2_scl=0x100,i2c2_sda.i2c2_sda=0x100
 
+	omap_debugss_en	[OMAP] Enable Debug Sub-System module required
+			for JTAG debugging.
+
 	oprofile.timer=	[HW]
 			Use timer interrupt instead of performance counters
 
arch/arm/mach-omap2/Makefile +1 -1
index d1156cf..aaf5cc2 100644
@@ -5,7 +5,7 @@
 # Common support
 obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \
 	 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
-	 omap_device.o sram.o
+	 omap_device.o sram.o debugss.o
 
 omap-2-3-common				= irq.o
 hwmod-common				= omap_hwmod.o \
arch/arm/mach-omap2/debugss.c new file +80 -1
new file mode 100644
index 0000000..b45bf2c
@@ -0,0 +1,80 @@
+/*
+ * debugss.c: Debug Sus-System related code goes in here
+ *
+ * Copyright (C) {2013} Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This file is automatically generated from the AM33XX hardware databases.
+ * 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 version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/init.h>
+#include <linux/err.h>
+#include <linux/clk.h>
+
+#include "omap_hwmod.h"
+
+static bool is_debugss_en;
+
+/**
+ * omap_debugss_en - Enable debugss clock/module based on user config
+ *
+ * During kernel bootup, omap2 hwmod framework will disable all the
+ * unused/unclaimed modules, which in turn also disables debugss module.
+ * This breaks any further debugging capability provided by HW.
+ *
+ *
+ * Introduce early param which allows user to enable clock/module -
+ *
+ *   omap_debugss_en	(For all OMAP2 architectures)
+ *
+ * Please note that, with this command-line param, module always remain
+ * enabled.
+ */
+static int __init omap_debugss_en(char *str)
+{
+	is_debugss_en = true;
+	return 0;
+}
+early_param("omap_debugss_en", omap_debugss_en);
+
+static int __init _omap2_debugss_enable(void)
+{
+	const char oh_name[10] = "debugss";
+	struct omap_hwmod *oh;
+	int ret;
+
+	if (is_debugss_en) {
+		struct omap_hwmod_opt_clk *oc;
+		int i;
+
+		oh = omap_hwmod_lookup(oh_name);
+		if (!oh) {
+			pr_err("debugss device not found\n");
+			return 0;
+		}
+
+		/* Make sure that hwmod internal data structures are setup */
+		ret = omap_hwmod_setup_one(oh_name);
+		if (ret) {
+			pr_err("failed to setup hwmod for %s\n", oh_name);
+			return 0;
+		}
+		/* Enable optional clocks */
+		for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)	{
+			if (oc->_clk)
+				clk_prepare_enable(oc->_clk);
+		}
+		/* Enable debugss clock/module  */
+		omap_hwmod_enable(oh);
+	}
+
+	return 0;
+}
+device_initcall(_omap2_debugss_enable);
--

1.7.0.4

#198 lore raw

RFC PATCH 3/3 ARM: OMAP2+: Add command line parameter for debugSS module control

Quoted 25 lines

-----Original Message-----
From: Tony Lindgren [mailto:tony at atomide.com]
Sent: Monday, April 08, 2013 11:00 PM
To: Hiremath, Vaibhav
Cc: linux-omap at vger.kernel.org; khilman at linaro.org; paul at pwsan.com; Nayak, Rajendra; linux-arm-kernel at lists.infradead.org
Subject: Re: [RFC PATCH 3/3] ARM: OMAP2+: Add command line parameter for debugSS module control

Hi,

Quoted 12 lines · hvaibhav at ti.com

From: Vaibhav Hiremath <[email protected]>

Currently there is no clean mechanism to control debugSS module and you have to always keep clocks enabled, either,

- By enabling it during boot as part of clk_init function. Or
- By having HWMOD_INIT_NO_IDLE flag in hwmod data.

Based on the discussion,
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg81771.html

Quoted 8 lines
Quoted 3 lines

This patch introduces new kernel parameter "omap_debugss_en", which will allow user to control debugSS module enable/disable part during boot-time.

I suggest you just make this part into a standard DT only device driver. That way the command line parsing and clock enabling can happen the normal way.

That?s good idea, as we are moving towards DT only boot support. Also, are you suggesting to have both command-line param and DT Property for this?

Quoted 2 lines

Is there any reason why this could not be a loadable module?

Because we want to keep it enabled before late_initcall. As part of late_initcall Clock/hwmod framework will start disabling unused modules, which will impact the Debugs as well. Consider the case where this debugss is loaded as a module, the user Will loose the JTAG connection until the module is loaded; and once module is Loaded, he has to again re-connect to the debugss.

With only DT option the code will look like below, is this what you also have in your mind -

arch/arm/boot/dts/am33xx.dtsi:

	debugss: debugss at 4b000000 {
		compatible = "ti,debugss";
		ti,hwmods = "debugss";
		reg = <0x4b000000 1000000>;
		status = "disabled";	/* User need to enable it if he need JTAG connectivity*/
	};

arch/arm/mach-omap2/debugss.c:

	static int __init _omap2_debugss_enable(void)
	{
		struct device_node *np;
	
		np = of_find_matching_node(oh_name);
		if (!node || ! of_device_is_available()) {
			pr_err("debugss device is not found\n");
			return -ENODEV;
		}
		...
		hwmod lookup./setup/enable along with optional clock enable.
		...

	}
	device_initcall(_omap2_debugss_enable);

Thanks,
Vaibhav

maintainer
#199 lore raw

RFC PATCH 3/3 ARM: OMAP2+: Add command line parameter for debugSS module control

Quoted 12 lines · Hiremath, Vaibhav
Quoted 6 lines

From: Tony Lindgren [mailto:tony at atomide.com]

I suggest you just make this part into a standard DT only device driver. That way the command line parsing and clock enabling can happen the normal way.

That?s good idea, as we are moving towards DT only boot support. Also, are you suggesting to have both command-line param and DT Property for this?

Quoted 8 lines
Quoted 2 lines

Is there any reason why this could not be a loadable module?

Because we want to keep it enabled before late_initcall. As part of late_initcall Clock/hwmod framework will start disabling unused modules, which will impact the Debugs as well. Consider the case where this debugss is loaded as a module, the user Will loose the JTAG connection until the module is loaded; and once module is Loaded, he has to again re-connect to the debugss.

It will get run before late_initcall if compiled in. Sounds like there are no issues also make it work as a loadable module as needed.

Quoted 14 lines

With only DT option the code will look like below, is this what you also have in your mind -

arch/arm/boot/dts/am33xx.dtsi:

	debugss: debugss at 4b000000 {
		compatible = "ti,debugss";
		ti,hwmods = "debugss";
		reg = <0x4b000000 1000000>;
		status = "disabled";	/* User need to enable it if he need JTAG connectivity*/
	};

arch/arm/mach-omap2/debugss.c:

Quoted 15 lines
	static int __init _omap2_debugss_enable(void)
	{
		struct device_node *np;
	
		np = of_find_matching_node(oh_name);
		if (!node || ! of_device_is_available()) {
			pr_err("debugss device is not found\n");
			return -ENODEV;
		}
		...
		hwmod lookup./setup/enable along with optional clock enable.
		...

	}
	device_initcall(_omap2_debugss_enable);

It should be all standard device driver stuff. I'd make it just regular module_platform_driver and only initialize it earlier if compiled in.

Regards,

Tony

#200 lore raw

RFC PATCH 3/3 ARM: OMAP2+: Add command line parameter for debugSS module control

Quoted 31 lines

-----Original Message-----
From: Tony Lindgren [mailto:tony at atomide.com]
Sent: Tuesday, April 09, 2013 10:05 PM
To: Hiremath, Vaibhav
Cc: linux-omap at vger.kernel.org; khilman at linaro.org; paul at pwsan.com; Nayak, Rajendra; linux-arm-kernel at lists.infradead.org
Subject: Re: [RFC PATCH 3/3] ARM: OMAP2+: Add command line parameter for debugSS module control

Quoted 12 lines · Hiremath, Vaibhav
Quoted 6 lines

From: Tony Lindgren [mailto:tony at atomide.com]

I suggest you just make this part into a standard DT only device driver. That way the command line parsing and clock enabling can happen the normal way.

That?s good idea, as we are moving towards DT only boot support. Also, are you suggesting to have both command-line param and DT Property for this?

Quoted 4 lines
Quoted 2 lines

Is there any reason why this could not be a loadable module?

Because we want to keep it enabled before late_initcall. As part of

late_initcall

Quoted 1 line

Clock/hwmod framework will start disabling unused modules, which will

impact the

Quoted 1 line

Debugs as well. Consider the case where this debugss is loaded as a

Quoted 9 lines

module, the user

Quoted 1 line

Will loose the JTAG connection until the module is loaded; and once

module is

Quoted 1 line

Loaded, he has to again re-connect to the debugss.

It will get run before late_initcall if compiled in. Sounds like there are no issues also make it work as a loadable module as needed.

Agreed on making it as a module.

But do you think we should allow it as a loadable module (M) as well, as user will loose Connectivity to JTAG during boot. Another perspective here would be, user can insert the module and Get JTAG connectivity, which also seems ok to me.

Can you also confirm on having command line argument? I think We can only live with DT based approach, right?

Thanks,
Vaibhav

maintainer
#201 lore raw

RFC PATCH 3/3 ARM: OMAP2+: Add command line parameter for debugSS module control

Quoted 6 lines · Hiremath, Vaibhav

Agreed on making it as a module.

But do you think we should allow it as a loadable module (M) as well, as user will loose Connectivity to JTAG during boot. Another perspective here would be, user can insert the module and Get JTAG connectivity, which also seems ok to me.

Yes both ways should be doable.

Quoted 2 lines

Can you also confirm on having command line argument? I think We can only live with DT based approach, right?

Well I doubt that anybody wants to keep it permanently enabled because of the power consumption and blocking of PM states, so an additional cmdline might make sense.

It would be nice to have it most of the time built-in but disable itself unless something debug is specified in the cmdline.

Maybe the JTAG driver can detect when the cable is connected? Or maybe that would be only when there's clock coming over JTAG?

Regards,

Tony

#202 lore raw

PATCH 1/1 am335x: Enable DDR PHY dynamic power down bit for DDR3 boards

Enable DDR PHY dynamic power down bit, which enables powering down the IO receiver when not performing read.

This also helps in reducing overall power consumption in low power states (suspend/standby).

---
 arch/arm/include/asm/arch-am33xx/ddr_defs.h |    1 +
 board/ti/am335x/board.c                     |    6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)
arch/arm/include/asm/arch-am33xx/ddr_defs.h +1 -0
index ae43ef8..7ab3baf 100644
@@ -28,6 +28,7 @@
 #define VTP_CTRL_START_EN	(0x1)
 #define PHY_DLL_LOCK_DIFF	0x0
 #define DDR_CKE_CTRL_NORMAL	0x1
+#define PHY_EN_DYN_PWRDN	(0x1 << 20)
 
 /* Micron MT47H128M16RT-25E */
 #define MT47H128M16RT25E_EMIF_READ_LATENCY	0x100005
board/ti/am335x/board.c +4 -2
index 48e6896..22d7b25 100644
@@ -251,7 +251,8 @@ static struct emif_regs ddr3_emif_reg_data = {
 	.sdram_tim2 = MT41J128MJT125_EMIF_TIM2,
 	.sdram_tim3 = MT41J128MJT125_EMIF_TIM3,
 	.zq_config = MT41J128MJT125_ZQ_CFG,
-	.emif_ddr_phy_ctlr_1 = MT41J128MJT125_EMIF_READ_LATENCY,
+	.emif_ddr_phy_ctlr_1 = MT41J128MJT125_EMIF_READ_LATENCY |
+				PHY_EN_DYN_PWRDN,
 };
 
 static struct emif_regs ddr3_evm_emif_reg_data = {
@@ -261,7 +262,8 @@ static struct emif_regs ddr3_evm_emif_reg_data = {
 	.sdram_tim2 = MT41J512M8RH125_EMIF_TIM2,
 	.sdram_tim3 = MT41J512M8RH125_EMIF_TIM3,
 	.zq_config = MT41J512M8RH125_ZQ_CFG,
-	.emif_ddr_phy_ctlr_1 = MT41J512M8RH125_EMIF_READ_LATENCY,
+	.emif_ddr_phy_ctlr_1 = MT41J512M8RH125_EMIF_READ_LATENCY |
+				PHY_EN_DYN_PWRDN,
 };
 #endif
 
Signature · 1 line
1.7.0.4
#203 lore raw

PATCH 1/1 am335x: Enable DDR PHY dynamic power down bit for DDR3 boards

Quoted 41 lines · Vaibhav Hiremath

Enable DDR PHY dynamic power down bit, which enables powering down the IO receiver when not performing read.

This also helps in reducing overall power consumption in low power states (suspend/standby).

---
 arch/arm/include/asm/arch-am33xx/ddr_defs.h |    1 +
 board/ti/am335x/board.c                     |    6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)
arch/arm/include/asm/arch-am33xx/ddr_defs.h +1 -0
index ae43ef8..7ab3baf 100644
@@ -28,6 +28,7 @@
 #define VTP_CTRL_START_EN	(0x1)
 #define PHY_DLL_LOCK_DIFF	0x0
 #define DDR_CKE_CTRL_NORMAL	0x1
+#define PHY_EN_DYN_PWRDN	(0x1 << 20)
 
 /* Micron MT47H128M16RT-25E */
 #define MT47H128M16RT25E_EMIF_READ_LATENCY	0x100005
board/ti/am335x/board.c +2 -1
index 48e6896..22d7b25 100644
@@ -251,7 +251,8 @@ static struct emif_regs ddr3_emif_reg_data = {
 	.sdram_tim2 = MT41J128MJT125_EMIF_TIM2,
 	.sdram_tim3 = MT41J128MJT125_EMIF_TIM3,
 	.zq_config = MT41J128MJT125_ZQ_CFG,
-	.emif_ddr_phy_ctlr_1 = MT41J128MJT125_EMIF_READ_LATENCY,
+	.emif_ddr_phy_ctlr_1 = MT41J128MJT125_EMIF_READ_LATENCY |
+				PHY_EN_DYN_PWRDN,
 };
 
 static struct emif_regs ddr3_evm_emif_reg_data = {

board/ti/am335x/board.c static struct emif_regs ddr3_evm_emif_reg_data = { · line 268

Quoted 8 lines
board/ti/am335x/board.c +2 -1
@@ -261,7 +262,8 @@ static struct emif_regs ddr3_evm_emif_reg_data = {
 	.sdram_tim2 = MT41J512M8RH125_EMIF_TIM2,
 	.sdram_tim3 = MT41J512M8RH125_EMIF_TIM3,
 	.zq_config = MT41J512M8RH125_ZQ_CFG,
-	.emif_ddr_phy_ctlr_1 = MT41J512M8RH125_EMIF_READ_LATENCY,
+	.emif_ddr_phy_ctlr_1 = MT41J512M8RH125_EMIF_READ_LATENCY |
+				PHY_EN_DYN_PWRDN,
 };
 #endif

Lars, I suspect pcm051 also could use a change like this.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130315/deefa054/attachment.pgp>
#204 lore raw

PATCH 1/1 am335x: Enable DDR PHY dynamic power down bit for DDR3 boards

Quoted 60 lines · Tom Rini
Quoted 59 lines · Vaibhav Hiremath

Enable DDR PHY dynamic power down bit, which enables powering down the IO receiver when not performing read.

This also helps in reducing overall power consumption in low power states (suspend/standby).

---

 arch/arm/include/asm/arch-am33xx/ddr_defs.h |    1 +
 board/ti/am335x/board.c                     |    6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/arch/arm/include/asm/arch-am33xx/ddr_defs.h index ae43ef8..7ab3baf 100644

arch/arm/include/asm/arch-am33xx/ddr_defs.h +1 -0
@@ -28,6 +28,7 @@
 
 #define VTP_CTRL_START_EN	(0x1)
 #define PHY_DLL_LOCK_DIFF	0x0
 #define DDR_CKE_CTRL_NORMAL	0x1
 
+#define PHY_EN_DYN_PWRDN	(0x1 << 20)
 

/* Micron MT47H128M16RT-25E */
#define MT47H128M16RT25E_EMIF_READ_LATENCY 0x100005

board/ti/am335x/board.c +2 -1
index 48e6896..22d7b25 100644
@@ -251,7 +251,8 @@ static struct emif_regs ddr3_emif_reg_data = {
 
 	.sdram_tim2 = MT41J128MJT125_EMIF_TIM2,
 	.sdram_tim3 = MT41J128MJT125_EMIF_TIM3,
 	.zq_config = MT41J128MJT125_ZQ_CFG,
 
-	.emif_ddr_phy_ctlr_1 = MT41J128MJT125_EMIF_READ_LATENCY,
+	.emif_ddr_phy_ctlr_1 = MT41J128MJT125_EMIF_READ_LATENCY |
+				PHY_EN_DYN_PWRDN,
 

};

static struct emif_regs ddr3_evm_emif_reg_data = {

board/ti/am335x/board.c +2 -1
@@ -261,7 +262,8 @@ static struct emif_regs ddr3_evm_emif_reg_data = {
 
 	.sdram_tim2 = MT41J512M8RH125_EMIF_TIM2,
 	.sdram_tim3 = MT41J512M8RH125_EMIF_TIM3,
 	.zq_config = MT41J512M8RH125_ZQ_CFG,
 
-	.emif_ddr_phy_ctlr_1 = MT41J512M8RH125_EMIF_READ_LATENCY,
+	.emif_ddr_phy_ctlr_1 = MT41J512M8RH125_EMIF_READ_LATENCY |
+				PHY_EN_DYN_PWRDN,
 
Quoted 6 lines
Quoted 2 lines

};
#endif

Lars, I suspect pcm051 also could use a change like this.

Many thanks for the hint! Yes, I think this could also be of use for pcm051. I can care about it and make a patch for pcm051 after my two weeks holiday :)

Lars

#205 lore raw

[U-Boot] am335x: Enable DDR PHY dynamic power down bit for DDR3 boards

In reply to Vaibhav Hiremath
Quoted 10 lines · hvaibhav at ti.com

Enable DDR PHY dynamic power down bit, which enables powering down the IO receiver when not performing read.

This also helps in reducing overall power consumption in low power states (suspend/standby).

Applied to u-boot-ti/master (and already pulled into u-boot-arm), thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130326/98092055/attachment.pgp>