When I originally ported the GPIO configuration routines for the Intel 3100 southbridge from esb6300_lpc.c, I left out the code that lets you specify per-mainboard GPIO settings. This patch implements those configuration routines, so you can put something like
register "gpio[23]" = "I3100_GPIO_USE_AS_GPIO | I3100_GPIO_SEL_OUTPUT | I3100_GPIO_LVL_LOW"
in Config.lb to set GPIO 23 as an output, driving the signal low.
Signed-off-by: Ed Swierk eswierk@arastra.com
On Wed, 7 May 2008 12:55:24 -0700, "Ed Swierk" eswierk@arastra.com wrote:
When I originally ported the GPIO configuration routines for the Intel 3100 southbridge from esb6300_lpc.c, I left out the code that lets you specify per-mainboard GPIO settings. This patch implements those configuration routines, so you can put something like
register "gpio[23]" = "I3100_GPIO_USE_AS_GPIO | I3100_GPIO_SEL_OUTPUT | I3100_GPIO_LVL_LOW"
in Config.lb to set GPIO 23 as an output, driving the signal low.
Signed-off-by: Ed Swierk eswierk@arastra.com
The gpio settings very from board to board. Why not leave this up to the mainboard? See how I have the RCA RM4100 setup in gpio.c
On Wed, May 7, 2008 at 2:28 PM, Joe joe@settoplinux.org wrote:
The gpio settings very from board to board. Why not leave this up to the mainboard?
Some settings are board-specific but others are required by the chipset. For example the Intel 3100 datasheet says software is required to drive a handful of GPIOs in a particular way.
As long as the chipset code has to deal with GPIOs, it may as well try to abstract away some of the boilerplate code and magic values, making it easier to port to a new mainboard.
And the code already exists, so why not use it?
--Ed
-----Original Message----- From: coreboot-bounces@coreboot.org [mailto:coreboot-bounces@coreboot.org] On Behalf Of Ed Swierk Sent: Wednesday, May 07, 2008 5:44 PM To: coreboot@coreboot.org Subject: Re: [coreboot] [PATCH] Implement GPIO configuration options forIntel 3100 southbridge
On Wed, May 7, 2008 at 2:28 PM, Joe joe@settoplinux.org wrote:
The gpio settings very from board to board. Why not leave this up to
the
mainboard?
Some settings are board-specific but others are required by the chipset. For example the Intel 3100 datasheet says software is required to drive a handful of GPIOs in a particular way.
As long as the chipset code has to deal with GPIOs, it may as well try to abstract away some of the boilerplate code and magic values, making it easier to port to a new mainboard.
And the code already exists, so why not use it?
I guess it is just a matter of how you want to set it up. Either way works fine.
Thanks, Joseph Smith Set-Top-Linux www.settoplinux.org
On 07.05.2008 21:55, Ed Swierk wrote:
When I originally ported the GPIO configuration routines for the Intel 3100 southbridge from esb6300_lpc.c, I left out the code that lets you specify per-mainboard GPIO settings. This patch implements those configuration routines, so you can put something like
register "gpio[23]" = "I3100_GPIO_USE_AS_GPIO | I3100_GPIO_SEL_OUTPUT | I3100_GPIO_LVL_LOW"
in Config.lb to set GPIO 23 as an output, driving the signal low.
Signed-off-by: Ed Swierk eswierk@arastra.com
I don't have the datasheets handy, but the code looks OK.
Acked-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Regards, Carl-Daniel
On Wed, May 7, 2008 at 2:48 PM, Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
I don't have the datasheets handy, but the code looks OK.
Acked-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Thanks, r3290.
--Ed