public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Daniel Gorsulowski <Daniel.Gorsulowski@esd.eu>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] at91: Add support for MEESC board of esd gmbh
Date: Mon, 25 May 2009 08:21:45 +0200	[thread overview]
Message-ID: <4A1A38F9.4010707@esd.eu> (raw)
In-Reply-To: <20090523000114.GG19891@game.jcrosoft.org>

Jean-Christophe PLAGNIOL-VILLARD schrieb:
>> +
>> +static void meesc_ethercat_hw_init(void)
>> +{
>> +	/* Configure SMC EBI1_CS0 for EtherCAT */
>> +	at91_sys_write(AT91_SMC1_SETUP(0),
>> +		AT91_SMC_NWESETUP_(0) | AT91_SMC_NCS_WRSETUP_(0) |
>> +		AT91_SMC_NRDSETUP_(0) | AT91_SMC_NCS_RDSETUP_(0));
>> +	at91_sys_write(AT91_SMC1_PULSE(0),
>> +		AT91_SMC_NWEPULSE_(4) | AT91_SMC_NCS_WRPULSE_(9) |
>> +		AT91_SMC_NRDPULSE_(4) | AT91_SMC_NCS_RDPULSE_(9));
>> +	at91_sys_write(AT91_SMC1_CYCLE(0),
>> +		AT91_SMC_NWECYCLE_(10) | AT91_SMC_NRDCYCLE_(5));
>> +	/* Configure behavior at external wait signal, byte-select mode, 16 bit
>> +	data bus width, none data float wait states and TDF optimization */
>> +	at91_sys_write(AT91_SMC1_MODE(0),
>> +		AT91_SMC_READMODE | AT91_SMC_EXNWMODE_READY |
>> +		AT91_SMC_BAT_SELECT | AT91_SMC_DBW_16 | AT91_SMC_TDF_(0) |
>> +		AT91_SMC_TDFMODE);
>> +
>> +	/* Configure RDY/BSY */
>> +	at91_set_B_periph(AT91_PIN_PE20, 0);	/* EBI1_NWAIT */
> do you really need this
> you do not seems to use it anywhere?
Yes, I really need this for debugging the ET1100 and for accessing its process
memory by md/mw/mm.
>> +}
>> +
>> +#ifdef CONFIG_HAS_DATAFLASH
> please keep the file organisation as the other at91sam9
Ok.
>> +AT91S_DATAFLASH_INFO dataflash_info[CONFIG_SYS_MAX_DATAFLASH_BANKS];
>> +
>> +struct dataflash_addr cs[CONFIG_SYS_MAX_DATAFLASH_BANKS] = {
>> +	{CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0, 0},	/* Logical adress, CS */
>> +};
>> +
>> +/* define the area offsets */
>> +dataflash_protect_t area_list[NB_DATAFLASH_AREA] = {
>> +	{0x00000000, 0x000041FF, FLAG_PROTECT_SET,   0, "Bootstrap"},
>> +	{0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"},
>> +	{0x00008400, 0x00041FFF, FLAG_PROTECT_SET,   0, "U-Boot"},
>> +};
>> +#endif /* CONFIG_HAS_DATAFLASH */
>> +
>> +int dram_init(void)
>> +{
>> +	gd->bd->bi_dram[0].start = PHYS_SDRAM;
>> +	gd->bd->bi_dram[0].size = get_ram_size((long *) PHYS_SDRAM, (1 << 27));
>> +	return 0;
>> +}
>> +
>> +int board_eth_init(bd_t *bis)
>> +{
>> +	int rc = 0;
>> +#ifdef CONFIG_MACB
>> +	rc = macb_eth_initialize(0, (void *)AT91SAM9263_BASE_EMAC, 0x00);
>> +#endif
>> +	return rc;
>> +}
>> +
>> +int checkboard(void)
>> +{
>> +	char str[32];
>> +	char buf[32];
>> +
>> +	puts("Board: esd CAN-EtherCAT Gateway");
>> +	if (getenv_r("serial#", str, sizeof(str)) > 0) {
>> +		puts(", serial# ");
>> +		puts(str);
>> +	}
>> +	printf("\nHardware-revision: 1.%d\n", get_hw_rev());
>> +	printf("Crystal frequency:\t%8s MHz\n",
>> +					strmhz(buf, get_main_clk_rate()));
>> +	printf("CPU clock:\t\t%8s MHz\n",
>> +					strmhz(buf, get_cpu_clk_rate()));
>> +#ifdef CONFIG_SHOW_VERBOSE_CLOCKINFO
>> +	printf("Master clock:\t\t%8s MHz\n",
>> +					strmhz(buf, get_mck_clk_rate()));
>> +	printf("PLL A clock:\t\t%8s MHz\n",
>> +					strmhz(buf, get_plla_clk_rate()));
>> +	printf("PLL B Reg.:\t\t0x%08X\n",
>> +					at91_sys_read(AT91_CKGR_PLLBR));
>> +	printf("PLL B clock:\t\t%8s MHz\n",
>> +					strmhz(buf, get_pllb_clk_rate()));
>> +#endif
>> +	printf("Mach-type: %lu\n", gd->bd->bi_arch_number);
>> +	return 0;
>> +}
>> +
>> +int board_init(void)
>> +{
>> +	/* Enable Ctrlc */
>> +	console_init_f();
>> +
>> +	/* Peripheral Clock Enable Register */
>> +	at91_sys_write(AT91_PMC_PCER,	1 << AT91SAM9263_ID_PIOA |
>> +					1 << AT91SAM9263_ID_PIOB |
>> +					1 << AT91SAM9263_ID_PIOCDE);
>> +
>> +#ifdef MACH_TYPE_MEESC	/* while asm-arm/mach-types.h is not up to date */
> you need to send a sync request
As I recognized, you sync against latest kernel source?
The problem is, the mach-types in kernel source is not up to date:
	# Last update: Mon Mar 23 20:09:01 2009
There has been several sync requests since my commit on Tue, 7 Apr 2009 11:19:31 GMT
(see http://www.arm.linux.org.uk/developer/machines/list.php?id=2165), but my board
is not included in kernel source yet. So, imho a sync request makes no sense. Unless
you sync against http://www.arm.linux.org.uk/developer/machines/download.php

Is this sufficient for a sync request, or should i send a request in a separate mail?
>> +	/* arch number of MEESC-Board */
>> +	gd->bd->bi_arch_number = MACH_TYPE_MEESC;
>> +#else
>> +	/* arch number of AT91SAM9263EK-Board */
>> +	gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9263EK;
> please remove
I'll remove this by a separate patch, if asm-arm/mach-types.h is up to date, ok?
>> +#endif
>> +	/* adress of boot parameters */
>> +	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
>> +
>> +	at91_serial_hw_init();
>> +#ifdef CONFIG_CMD_NAND
>> +	meesc_nand_hw_init();
>> +#endif
>> +	meesc_ethercat_hw_init();
>> +#ifdef CONFIG_HAS_DATAFLASH
>> +	at91_spi0_hw_init(1 << 0);
>> +#endif
>> +#ifdef CONFIG_MACB
>> +	meesc_macb_hw_init();
>> +#endif
> Best Regards,
> J.
> 
I'll send a cleared up patch for this board soon.

Best regards,
Daniel Gorsulowski

  reply	other threads:[~2009-05-25  6:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-18 11:20 [U-Boot] [PATCH] at91: Extended soft_i2c driver for AT91SAM9263 SoC Daniel Gorsulowski
2009-05-18 11:20 ` [U-Boot] [PATCH] at91: Add support for MEESC board of esd gmbh Daniel Gorsulowski
2009-05-23  0:01   ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-25  6:21     ` Daniel Gorsulowski [this message]
2009-05-25  8:13       ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-25  8:47         ` Wolfgang Denk
2009-05-25  9:09         ` Matthias Fuchs
2009-05-25 10:09           ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-25 10:59             ` Wolfgang Denk
2009-05-23  0:02 ` [U-Boot] [PATCH] at91: Extended soft_i2c driver for AT91SAM9263 SoC Jean-Christophe PLAGNIOL-VILLARD
2009-05-25  6:27   ` Daniel Gorsulowski
2009-11-22 20:14 ` Wolfgang Denk
2009-11-23  7:49   ` Heiko Schocher
2009-11-23  8:28   ` Heiko Schocher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A1A38F9.4010707@esd.eu \
    --to=daniel.gorsulowski@esd.eu \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox