New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 818804 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

Update CONFIG_LPC and CONFIG_ESPI define names

Project Member Reported by jettrink@chromium.org, Mar 5 2018

Issue description

As of now, if you want to use the eSPI interface, you must define both CONFIG_ESPI and CONFIG_LPC. CONFIG_LPC guards the actually lpc interface and much of the shared host communication code that is generic to both LPC and eSPI.

- We should create a new config option: CONFIG_HOSTCMD_x86 that will guard the code that is generic to both LPC and eSPI.
- We should rename CONFIG_LPC to CONFIG_HOSTCMD_LPC
- We should rename CONFIG_ESPI to CONFIG_HOSTCMD_ESPI
- Automatically define CONFIG_HOSTCMD_x86 if either the lpc or espi config is present
- Produce a build error if both lpc and espi config options are both defined
- Rename any lpc.c files to better reflect what is provides
 
Components: OS>Firmware>EC
Project Member

Comment 2 by bugdroid1@chromium.org, May 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/dbfa3cf2dc3950fc5ee1fc81a2d2cdfe5150e9c4

commit dbfa3cf2dc3950fc5ee1fc81a2d2cdfe5150e9c4
Author: Jett Rink <jettrink@chromium.org>
Date: Wed May 23 04:56:37 2018

lpc/espi: define new targeted config options

Introduce CONFIG_HOSTCMD_LPC and CONFIG_HOSTCMD_ESPI which will replace
CONFIG_LPC and CONFIG_ESPI. Today the CONFIG_LPC option guards both
common code to eSPI and LPC and LPC-only code. Going forward
CONFIG_HOSTCMD_LPC will guard only LPC code, and a new option
CONFIG_HOSTCMD_X86 will guard common code to both LPC and eSPI.

I am leaving the CONFIG_LPC and CONFIG_ESPI defines in this CL so each
CL in the stack compiles.

BRANCH=none
BUG= chromium:818804 
TEST=Full stack builds and works on yorp (espi) and grunt (lpc)

Change-Id: I6ae3a805167a3404701d8a53c14dc83299afb376
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1067498
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/dbfa3cf2dc3950fc5ee1fc81a2d2cdfe5150e9c4/include/config.h

Project Member

Comment 3 by bugdroid1@chromium.org, May 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/ad31abcfc829e91acf09da0622f6b35ad7b13412

commit ad31abcfc829e91acf09da0622f6b35ad7b13412
Author: Jett Rink <jettrink@chromium.org>
Date: Wed May 23 04:56:37 2018

espi: convert all eSPI board to use CONFIG_HOSTCMD_ESPI

Convert all boards that use both CONFIG_ESPI and CONFIG_LPC to only use
the CONFIG_HOSTCMD_ESPI option.

BRANCH=none
BUG= chromium:818804 
TEST=entire stack works with lpc and espi

Change-Id: Idd1519494a4f880b7b2018d059579d50c5461fcf
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1067499
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/ad31abcfc829e91acf09da0622f6b35ad7b13412/baseboard/octopus/baseboard.h
[modify] https://crrev.com/ad31abcfc829e91acf09da0622f6b35ad7b13412/board/glkrvp/board.h
[modify] https://crrev.com/ad31abcfc829e91acf09da0622f6b35ad7b13412/board/zoombini/board.h
[modify] https://crrev.com/ad31abcfc829e91acf09da0622f6b35ad7b13412/board/npcx7_evb/board.h
[modify] https://crrev.com/ad31abcfc829e91acf09da0622f6b35ad7b13412/board/atlas/board.h
[modify] https://crrev.com/ad31abcfc829e91acf09da0622f6b35ad7b13412/board/eve/board.h
[modify] https://crrev.com/ad31abcfc829e91acf09da0622f6b35ad7b13412/board/nami/board.h
[modify] https://crrev.com/ad31abcfc829e91acf09da0622f6b35ad7b13412/board/mchpevb1/board.h
[modify] https://crrev.com/ad31abcfc829e91acf09da0622f6b35ad7b13412/board/glkrvp_ite/board.h
[modify] https://crrev.com/ad31abcfc829e91acf09da0622f6b35ad7b13412/board/poppy/board.h
[modify] https://crrev.com/ad31abcfc829e91acf09da0622f6b35ad7b13412/board/nautilus/board.h
[modify] https://crrev.com/ad31abcfc829e91acf09da0622f6b35ad7b13412/board/fizz/board.h
[modify] https://crrev.com/ad31abcfc829e91acf09da0622f6b35ad7b13412/board/nocturne/board.h

Project Member

Comment 5 by bugdroid1@chromium.org, May 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/fddf4e703d8673b8ea62f81c8aba3943cfeffea5

commit fddf4e703d8673b8ea62f81c8aba3943cfeffea5
Author: Jett Rink <jettrink@chromium.org>
Date: Wed May 23 04:56:38 2018

lpc: add explicit LPC define in board.h

The ITE eval board relied on the chip's define for LPC. Since the ITE
chip supports both LPC and eSPI, we want to define LPC here to be
explicit.

BRANCH=none
BUG= chromium:818804 
TEST=Full stack builds and works on yorp (espi) and grunt (lpc)

Change-Id: Ic477277543c1f24999070dc408052c7266df22e6
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1067501
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/fddf4e703d8673b8ea62f81c8aba3943cfeffea5/board/it83xx_evb/board.h

Project Member

Comment 6 by bugdroid1@chromium.org, May 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/df06639b1d4fd2798e577f9aead6bc4495d5f3b5

commit df06639b1d4fd2798e577f9aead6bc4495d5f3b5
Author: Jett Rink <jettrink@chromium.org>
Date: Wed May 23 04:56:39 2018

lpc/espi: convert ec chip code to use granular option

Break the ec chip code up with the more granular
CONFIG_HOSTCMD_(X86|LPC|ESPI) options.

BRANCH=none
BUG= chromium:818804 
TEST=Full stack builds and works on yorp (espi) and grunt (lpc)

Change-Id: Ie272787b2425175fe36b06fcdeeee90ec5ccbe95
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1067502
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/it83xx/intc.h
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/common/build.mk
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/it83xx/intc.c
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/it83xx/lpc.c
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/it83xx/config_chip.h
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/mchp/lpc_chip.h
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/core/nds32/init.S
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/mchp/system.c
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/it83xx/gpio.c
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/ish/config_chip.h
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/it83xx/clock.c
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/core/cortex-m/task.c
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/mchp/lpc.c
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/it83xx/build.mk
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/lm4/uart.c
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/npcx/clock.c
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/board/mchpevb1/gpio.inc
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/mec1322/build.mk
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/npcx/system.c
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/mchp/clock.c
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/lm4/build.mk
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/npcx/build.mk
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/npcx/lpc_chip.h
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/lm4/config_chip.h
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/mchp/build.mk
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/ish/build.mk
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/board/wheatley/board.h
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/npcx/lpc.c
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/mec1322/config_chip.h
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/mchp/config_chip.h
[modify] https://crrev.com/df06639b1d4fd2798e577f9aead6bc4495d5f3b5/chip/npcx/gpio.c

Project Member

Comment 7 by bugdroid1@chromium.org, May 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/8f6fff795bdfff6e98395b5aa3fc9127fa5748c1

commit 8f6fff795bdfff6e98395b5aa3fc9127fa5748c1
Author: Jett Rink <jettrink@chromium.org>
Date: Wed May 23 04:56:40 2018

lpc/espi: convert remaning CONFIG_LPC to CONFIG_HOSTCMD_X86

We have converted all LPC-only configs to HOSTCMD_LPC so the remaining
CONFIG_LPC defines represent the common case.

BRANCH=none
BUG= chromium:818804 
TEST=Full stack builds and works on yorp (espi) and grunt (lpc)

Change-Id: Iba9a48f2cab12fadd0d9ab8eab0d5d5476eab238
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1067503
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/8f6fff795bdfff6e98395b5aa3fc9127fa5748c1/power/common.c
[modify] https://crrev.com/8f6fff795bdfff6e98395b5aa3fc9127fa5748c1/common/motion_sense.c
[modify] https://crrev.com/8f6fff795bdfff6e98395b5aa3fc9127fa5748c1/common/ec_features.c
[modify] https://crrev.com/8f6fff795bdfff6e98395b5aa3fc9127fa5748c1/common/build.mk
[modify] https://crrev.com/8f6fff795bdfff6e98395b5aa3fc9127fa5748c1/common/host_command.c
[modify] https://crrev.com/8f6fff795bdfff6e98395b5aa3fc9127fa5748c1/include/host_command.h
[modify] https://crrev.com/8f6fff795bdfff6e98395b5aa3fc9127fa5748c1/common/main.c
[modify] https://crrev.com/8f6fff795bdfff6e98395b5aa3fc9127fa5748c1/common/host_event_commands.c
[modify] https://crrev.com/8f6fff795bdfff6e98395b5aa3fc9127fa5748c1/include/console_channel.inc
[modify] https://crrev.com/8f6fff795bdfff6e98395b5aa3fc9127fa5748c1/core/nds32/ec.lds.S

Project Member

Comment 8 by bugdroid1@chromium.org, May 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/535c0bf4fa8b1c44b96f1163d163b20cebdd0a92

commit 535c0bf4fa8b1c44b96f1163d163b20cebdd0a92
Author: Jett Rink <jettrink@chromium.org>
Date: Wed May 23 16:13:50 2018

cleanup: remove transition code for LPC/ESPI cleanup

BRANCH=none
BUG= chromium:818804 
TEST=full stack works with lpc and espi

Change-Id: I371e993bc97e7e87fb1075cf3dba82082402c0cf
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1067504
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/535c0bf4fa8b1c44b96f1163d163b20cebdd0a92/board/bds/board.h
[modify] https://crrev.com/535c0bf4fa8b1c44b96f1163d163b20cebdd0a92/include/config.h

Project Member

Comment 9 by bugdroid1@chromium.org, May 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/4d23d995c3a915cdcd2129b382c6f276e159aa44

commit 4d23d995c3a915cdcd2129b382c6f276e159aa44
Author: Jett Rink <jettrink@chromium.org>
Date: Wed May 23 16:13:49 2018

espi: rename remaining eSPI options

Change prefix from CONFIG_ESPI to CONFIG_HOSTCMD_ESPI for consistency.

BRANCH=none
BUG= chromium:818804 
TEST=Full stack builds and works on yorp (espi) and grunt (lpc)

Change-Id: I8b6e7eea515d14a0ba9030647cec738d95aea587
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1067513
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/power/common.c
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/atlas/board.h
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/eve/board.h
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/chip/it83xx/lpc.c
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/nautilus/board.c
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/it83xx_evb/gpio.inc
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/poppy/board.c
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/zoombini/board.h
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/nautilus/board.h
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/zoombini/board.c
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/poppy/board.h
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/include/config.h
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/chip/mchp/espi.c
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/wheatley/board.h
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/chip/mchp/lpc.c
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/nautilus/gpio.inc
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/mchpevb1/gpio.inc
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/npcx7_evb/board.h
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/power/intel_x86.c
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/wheatley/gpio.inc
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/fizz/board.c
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/mchpevb1/board.h
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/fizz/board.h
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/fizz/gpio.inc
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/nami/board.h
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/reef_it8320/gpio.inc
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/poppy/gpio.inc
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/zoombini/gpio.inc
[modify] https://crrev.com/4d23d995c3a915cdcd2129b382c6f276e159aa44/board/wheatley/board.c

We decided to not rename function names and files at this point since hostcmd_x86_ doesn't add much clarity, and it is a decent amount longer for function names.

When most boards on ToT are using eSPI. We can rename the prefix to espi_ and let lpc be the legacy lie at that point.
Status: Fixed (was: Assigned)

Sign in to add a comment