All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 05/14] ARM: AM43XX: board: add support for reading onboard EEPROM
Date: Wed, 6 Nov 2013 16:37:19 -0500	[thread overview]
Message-ID: <527AB68F.9040909@ti.com> (raw)
In-Reply-To: <CANacCWyiMiNbEaSi4vZwNyP3WCX=xy-LuBeVg8kbYzxAKn1Jkw@mail.gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/06/2013 11:39 AM, Vaibhav Bedia wrote:
> On Wed, Nov 6, 2013 at 8:25 AM, Lokesh Vutla <lokeshvutla@ti.com> wrote:
>> On Wednesday 06 November 2013 06:08 PM, Vaibhav Bedia wrote:
>>> On Mon, Nov 4, 2013 at 11:20 PM, Lokesh Vutla <lokeshvutla@ti.com> wrote:
>>>> From: Sekhar Nori <nsekhar@ti.com>
>>>>
>>>> Add support for reading onboard EEPROM to enable
>>>> board detection.
>>>>
>>>> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
>>>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>>>> ---
>>>>  arch/arm/include/asm/arch-am33xx/omap.h |    2 ++
>>>>  board/ti/am43xx/board.c                 |   46 +++++++++++++++++++++++++++++++
>>>>  board/ti/am43xx/board.h                 |   32 +++++++++++++++++++++
>>>>  include/configs/am43xx_evm.h            |    7 +++++
>>>>  4 files changed, 87 insertions(+)
>>>>
>>>> diff --git a/arch/arm/include/asm/arch-am33xx/omap.h b/arch/arm/include/asm/arch-am33xx/omap.h
>>>> index 2250721..10f05c9 100644
>>>> --- a/arch/arm/include/asm/arch-am33xx/omap.h
>>>> +++ b/arch/arm/include/asm/arch-am33xx/omap.h
>>>> @@ -27,5 +27,7 @@
>>>>  #define NON_SECURE_SRAM_START  0x402F0400
>>>>  #define NON_SECURE_SRAM_END    0x40340000
>>>>  #define SRAM_SCRATCH_SPACE_ADDR        0x4033C000
>>>> +#define AM4372_BOARD_NAME_START        SRAM_SCRATCH_SPACE_ADDR
>>>> +#define AM4372_BOARD_NAME_END  SRAM_SCRATCH_SPACE_ADDR + 0xC
>>>>  #endif
>>>>  #endif
>>>> diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c
>>>> index dcd8cbb..4fc1a40 100644
>>>> --- a/board/ti/am43xx/board.c
>>>> +++ b/board/ti/am43xx/board.c
>>>> @@ -9,6 +9,8 @@
>>>>   */
>>>>
>>>>  #include <common.h>
>>>> +#include <i2c.h>
>>>> +#include <asm/errno.h>
>>>>  #include <spl.h>
>>>>  #include <asm/arch/clock.h>
>>>>  #include <asm/arch/sys_proto.h>
>>>> @@ -17,6 +19,50 @@
>>>>
>>>>  DECLARE_GLOBAL_DATA_PTR;
>>>>
>>>> +/*
>>>> + * Read header information from EEPROM into global structure.
>>>> + */
>>>> +static int read_eeprom(struct am43xx_board_id *header)
>>>> +{
>>>> +       /* Check if baseboard eeprom is available */
>>>> +       if (i2c_probe(CONFIG_SYS_I2C_EEPROM_ADDR)) {
>>>> +               printf("Could not probe the EEPROM at 0x%x\n",
>>>> +                      CONFIG_SYS_I2C_EEPROM_ADDR);
>>>> +               return -ENODEV;
>>>> +       }
>>>> +
>>>> +       /* read the eeprom using i2c */
>>>> +       if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 2, (uchar *)header,
>>>> +                    sizeof(struct am43xx_board_id))) {
>>>> +               printf("Could not read the EEPROM\n");
>>>> +               return -EIO;
>>>> +       }
>>>> +
>>>> +       if (header->magic != 0xEE3355AA) {
>>>
>>> Why is the header the same as AM335x? Shouldn't it be something
>>> like 0xEE3344AA or whatever?
>> No, the header is still same. It is 0xEE3355AA.
>>
> 
> My question was why ;)
> What's the point of adding the same magic value for a different SoC?
> Unless there's a good reason for doing so i think this needs to be fixed
> in the EEPROM programmer.

A magic value is sufficiently magical, I don't think we'll get anyone to
change it at this point.

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJSeraOAAoJENk4IS6UOR1W/JgP/jShfGcdKDNKJ8EcwAgdy+iU
uFlC02b3f/I4cx7B4s0W3GWJVfHAlPlddSevzSE+I81/f+XRVy9w9Aso3J5hvD3e
XJ/deA5xSpKMV4kZjhE0mOO62iemH4r5ewiM1WFbzUUoWIa1Jf+C8pjygvac5UJb
DCIE40VigasMjl/bJbMOyZPKbrRbHIh+N7fFZNbo+WUp76ZM2dv0S1JWRaY/Zhpq
08wplMmlONGrOkRQmbVYTp2SPrSiYkxq98cIjyzqrzW2pAPDpWP9z7T5hlfI5iWz
It9AENzEkJhmzHTt2P6wq4R9z+giAGweRlFe08tB4lIawX5MaNYOU6TilZee7uf2
PbE5QP2ZXpXCH2Yme59syev/PVqrI02Z8zmZAvvUYQslkEXiXN4mCgWhGXVmZePE
+o+O2bACVAbaRANUZv4vosrPkFI5ooBCn9DR7ME7lZu93nIziMk+xRnzmYacSdQK
k2+GSQSmJ4zd0NCDNaYQ0Svhd3KY6jLZ/RaaYjN4ylNiEkNv8Skk+Vz8l4R8bctY
VZPJeZI/slNH4LfMV6pDuWjmVirJwrj8CmbrpBbWuILjcFjmwvDXt9mGZDlari9z
kK5s4TsAib29bGOPJIjBedmTLuQbaOy6GFppAYQCU063z+n/Jzsyp1ICQGtA5b6P
0PE9WmzQtC7+X15bIL5d
=l8oP
-----END PGP SIGNATURE-----

  reply	other threads:[~2013-11-06 21:37 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-05  4:20 [U-Boot] [PATCH 00/14] ARM: AM43xx: Update support for AM4372 SoC Lokesh Vutla
2013-11-05  4:20 ` [U-Boot] [PATCH 01/14] ARM: AM43xx: Update the base addresses of modules Lokesh Vutla
2013-11-06 12:28   ` Vaibhav Bedia
2013-11-06 13:12     ` Lokesh Vutla
2013-11-05  4:20 ` [U-Boot] [PATCH 02/14] ARM: AM43xx: Adapt to ti_armv7_common.h config file Lokesh Vutla
2013-11-06 12:34   ` Vaibhav Bedia
2013-11-06 13:18     ` Lokesh Vutla
2013-11-05  4:20 ` [U-Boot] [PATCH 03/14] ARM: AM43xx: Add L2 Support Lokesh Vutla
2013-11-05  4:20 ` [U-Boot] [PATCH 04/14] ARM: AM43xx: Add extra ENV settings Lokesh Vutla
2013-11-05  4:20 ` [U-Boot] [PATCH 05/14] ARM: AM43XX: board: add support for reading onboard EEPROM Lokesh Vutla
2013-11-06 12:38   ` Vaibhav Bedia
2013-11-06 13:25     ` Lokesh Vutla
2013-11-06 16:39       ` Vaibhav Bedia
2013-11-06 21:37         ` Tom Rini [this message]
2013-11-07 20:56           ` Vaibhav Bedia
2013-11-07 21:06             ` Tom Rini
2013-11-07 21:16               ` Vaibhav Bedia
2013-11-05  4:20 ` [U-Boot] [PATCH 06/14] ARM: AM43XX: Add CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG support Lokesh Vutla
2013-11-05  4:20 ` [U-Boot] [PATCH 07/14] ARM: AM43xx: Select clk source for Timer2 Lokesh Vutla
2013-11-06 12:40   ` Vaibhav Bedia
2013-11-07 13:43     ` Lokesh Vutla
2013-11-07 21:01       ` Vaibhav Bedia
2013-11-08 10:00         ` Lokesh Vutla
2013-11-05  4:20 ` [U-Boot] [PATCH 08/14] ARM: AM43xx: Update Current Booting devices list Lokesh Vutla
2013-11-05  4:20 ` [U-Boot] [PATCH 09/14] ARM: AM43xx: mux: Update mux data Lokesh Vutla
2013-11-06 12:43   ` Vaibhav Bedia
2013-11-06 13:32     ` Lokesh Vutla
2013-11-06 16:41       ` Vaibhav Bedia
2013-11-07  8:27         ` Lokesh Vutla
2013-11-05  4:20 ` [U-Boot] [PATCH 10/14] ARM: AM43xx: clocks: Update DPLL details for EPOS EVM Lokesh Vutla
2013-11-06 12:48   ` Vaibhav Bedia
2013-11-06 13:36     ` Lokesh Vutla
2013-11-05  4:20 ` [U-Boot] [PATCH 11/14] ARM: AM43xx: clocks: Add DPLL data for GP EVM Lokesh Vutla
2013-11-06 12:48   ` Vaibhav Bedia
2013-11-05  4:20 ` [U-Boot] [PATCH 12/14] ARM: AM43xx: EPOS_EVM: Add support for LPDDR2 Lokesh Vutla
2013-11-06 12:57   ` Vaibhav Bedia
2013-11-06 13:45     ` Lokesh Vutla
2013-11-06 16:44       ` Vaibhav Bedia
2013-11-06 21:26         ` Tom Rini
2013-11-05  4:20 ` [U-Boot] [PATCH 13/14] ARM: AM43xx: GP_EVM: Add support for DDR3 Lokesh Vutla
2013-11-06 13:02   ` Vaibhav Bedia
2013-11-06 13:54     ` Lokesh Vutla
2013-11-06 16:47       ` Vaibhav Bedia
2013-11-13  8:48       ` Lokesh Vutla
2013-11-13 14:08         ` Vaibhav Bedia
2013-11-13 16:08           ` Sekhar Nori
2013-11-13 17:50             ` Vaibhav Bedia
2013-11-14 14:21               ` Tom Rini
2013-11-14 14:18           ` Tom Rini
2013-11-05  4:21 ` [U-Boot] [PATCH 14/14] ARM: AM43xx: Add Maintainer Lokesh Vutla

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=527AB68F.9040909@ti.com \
    --to=trini@ti.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.