Skip to contentSkip to conversation

Kconfig: Drop some sandbox-related items

PATCH In review Simon Glass 2 participants 26 messages Nov 24, 2021 – Dec 15, 2021

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

v2 cover Kconfig: Drop some sandbox-related items

In an effort to pare down the sandbox.h header file, this series moves some options to Kconfig.

It also adds a migration warning for CONFIG_TIMER.

Changes in v2:
- Drop the unnecessary defconfig changes from the docs
- Use G instead of GB
- Add new patch to drop ATA_PORT_ADDR

Simon Glass (11):
trace: sandbox: Use only the Kconfig options
sandbox: Drop CONFIG_HOST_MAX_DEVICES
Convert CONFIG_SYS_FDT_LOAD_ADDR to Kconfig
Convert CONFIG_PHYSMEM to Kconfig
sandbox: video: Drop CONFIG_LCD_BMP_RLE8
Convert CONFIG_KEYBOARD to Kconfig
keyboard: Add a migration message
sandbox: Drop CONFIG_SYS_TIMER_RATE
ide: Drop unused CONFIG options
ide: Drop ATA_PORT_ADDR
timer: Add a migration message

 Makefile                                     |   5 +
 README                                       |  23 ---
 arch/Kconfig                                 |   3 +
 arch/arm/mach-exynos/Kconfig                 |   1 +
 arch/arm/mach-kirkwood/include/mach/config.h |   2 -
 arch/powerpc/include/asm/config.h            |   3 -
 arch/sandbox/Kconfig                         |  10 ++
 cmd/Kconfig                                  |   2 +
 cmd/host.c                                   |   2 +-
 common/lcd.c                                 | 142 -------------------
 configs/chromebit_mickey_defconfig           |   1 +
 configs/chromebook_jerry_defconfig           |   1 +
 configs/chromebook_minnie_defconfig          |   1 +
 configs/chromebook_speedy_defconfig          |   1 +
 configs/novena_defconfig                     |   1 +
 configs/smdk5250_defconfig                   |   1 +
 configs/smdk5420_defconfig                   |   1 +
 configs/tools-only_defconfig                 |   7 +-
 doc/develop/driver-model/migration.rst       |  16 +++
 doc/develop/trace.rst                        |   9 +-
 drivers/block/ide.c                          |  14 +-
 drivers/block/sandbox.c                      |   6 +-
 drivers/input/Kconfig                        |   9 ++
 include/configs/edison.h                     |   3 -
 include/configs/edminiv2.h                   |   2 -
 include/configs/exynos5-dt-common.h          |   3 -
 include/configs/novena.h                     |   1 -
 include/configs/r2dplus.h                    |   1 -
 include/configs/sandbox.h                    |  22 ---
 include/configs/smdk5250.h                   |   1 -
 include/configs/smdk5420.h                   |   2 -
 include/configs/veyron.h                     |   2 -
 include/configs/x86-common.h                 |   2 -
 include/sandboxblockdev.h                    |   3 +
 lib/Kconfig                                  |  10 ++
 scripts/config_whitelist.txt                 |   7 -
 36 files changed, 79 insertions(+), 241 deletions(-)
Signature · 1 line
2.34.0.rc2.393.gf8c9666880-goog
#1 lore raw

PATCH v2 1/11 trace: sandbox: Use only the Kconfig options

At present there are Kconfig options for tracing, but sandbox uses plain #defines to set them. Correct this and make the tracing command default to enabled so that this is not needed.

---

Changes in v2:
- Drop the unnecessary defconfig changes from the docs

 cmd/Kconfig           | 2 ++
 doc/develop/trace.rst | 9 ++-------
 2 files changed, 4 insertions(+), 7 deletions(-)
cmd/Kconfig +2 -0
index 5b30b13e438..fd8f0227c89 100644
@@ -2350,6 +2350,8 @@ config CMD_LOG
 
 config CMD_TRACE
 	bool "trace - Support tracing of function calls and timing"
+	depends on TRACE
+	default y
 	help
 	  Enables a command to control using of function tracing within
 	  U-Boot. This allows recording of call traces including timing
doc/develop/trace.rst +2 -7
index 7776c484286..843bc1f18ad 100644
@@ -30,16 +30,11 @@ Sandbox is a build of U-Boot that can run under Linux so it is a convenient
 way of trying out tracing before you use it on your actual board. To do
 this, follow these steps:
 
-Add the following to include/configs/sandbox.h (if not already there)
+Add the following to config/sandbox_defconfig
 
 .. code-block:: c
 
-    #define CONFIG_TRACE
-    #define CONFIG_CMD_TRACE
-    #define CONFIG_TRACE_BUFFER_SIZE    (16 << 20)
-    #define CONFIG_TRACE_EARLY_SIZE     (8 << 20)
-    #define CONFIG_TRACE_EARLY
-    #define CONFIG_TRACE_EARLY_ADDR     0x00100000
+    CONFIG_TRACE=y
 
 Build sandbox U-Boot with tracing enabled:
 
Signature · 1 line
2.34.0.rc2.393.gf8c9666880-goog
#2 lore raw

Re: [PATCH v2 01/11] trace: sandbox: Use only the Kconfig options

At present there are Kconfig options for tracing, but sandbox uses plain #defines to set them. Correct this and make the tracing command default to enabled so that this is not needed.

---

Changes in v2:
- Drop the unnecessary defconfig changes from the docs

 cmd/Kconfig           | 2 ++
 doc/develop/trace.rst | 9 ++-------
 2 files changed, 4 insertions(+), 7 deletions(-)

Applied to u-boot-dm/next, thanks!

#3 lore raw

PATCH v2 2/11 sandbox: Drop CONFIG_HOST_MAX_DEVICES

In reply to Simon Glass

This can go in the related header file. Drop the CONFIG option.

---

(no changes since v1)

 cmd/host.c                   | 2 +-
 drivers/block/sandbox.c      | 6 +++---
 include/configs/sandbox.h    | 2 --
 include/sandboxblockdev.h    | 3 +++
 scripts/config_whitelist.txt | 1 -
 5 files changed, 7 insertions(+), 7 deletions(-)
cmd/host.c +1 -1
index 2e998abbcdc..f0d989ac0f9 100644
@@ -78,7 +78,7 @@ static int do_host_info(struct cmd_tbl *cmdtp, int flag, int argc,
 	if (argc < 1 || argc > 2)
 		return CMD_RET_USAGE;
 	int min_dev = 0;
-	int max_dev = CONFIG_HOST_MAX_DEVICES - 1;
+	int max_dev = SANDBOX_HOST_MAX_DEVICES - 1;
 	if (argc >= 2) {
 		char *ep;
 		char *dev_str = argv[1];
drivers/block/sandbox.c +3 -3
index 1c2c3b4f886..53925ce9b69 100644
@@ -19,11 +19,11 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 #ifndef CONFIG_BLK
-static struct host_block_dev host_devices[CONFIG_HOST_MAX_DEVICES];
+static struct host_block_dev host_devices[SANDBOX_HOST_MAX_DEVICES];
 
 static struct host_block_dev *find_host_device(int dev)
 {
-	if (dev >= 0 && dev < CONFIG_HOST_MAX_DEVICES)
+	if (dev >= 0 && dev < SANDBOX_HOST_MAX_DEVICES)
 		return &host_devices[dev];
 
 	return NULL;
@@ -259,7 +259,7 @@ U_BOOT_DRIVER(sandbox_host_blk) = {
 U_BOOT_LEGACY_BLK(sandbox_host) = {
 	.if_typename	= "host",
 	.if_type	= IF_TYPE_HOST,
-	.max_devs	= CONFIG_HOST_MAX_DEVICES,
+	.max_devs	= SANDBOX_HOST_MAX_DEVICES,
 	.get_dev	= host_get_dev_err,
 };
 #endif
include/configs/sandbox.h +0 -2
index cc3a7ff05e4..b1689d39f11 100644
@@ -14,8 +14,6 @@
 #define CONFIG_SYS_TIMER_RATE		1000000
 #endif
 
-#define CONFIG_HOST_MAX_DEVICES 4
-
 #define CONFIG_MALLOC_F_ADDR		0x0010000
 
 #define CONFIG_SYS_CBSIZE		1024	/* Console I/O Buffer Size */
include/sandboxblockdev.h +3 -0
index 4006e942a02..4ca9554e38a 100644
@@ -6,6 +6,9 @@
 #ifndef __SANDBOX_BLOCK_DEV__
 #define __SANDBOX_BLOCK_DEV__
 
+/* Maximum number of host devices - see drivers/block/sandbox.c */
+#define SANDBOX_HOST_MAX_DEVICES	4
+
 struct host_block_dev {
 #ifndef CONFIG_BLK
 	struct blk_desc blk_dev;
scripts/config_whitelist.txt +0 -1
index b9c1c61e13d..10f7a6d4c08 100644
@@ -440,7 +440,6 @@ CONFIG_HIDE_LOGO_VERSION
 CONFIG_HIKEY_GPIO
 CONFIG_HITACHI_SX14
 CONFIG_HOSTNAME
-CONFIG_HOST_MAX_DEVICES
 CONFIG_HPS_ALTERAGRP_DBGATCLK
 CONFIG_HPS_ALTERAGRP_MAINCLK
 CONFIG_HPS_ALTERAGRP_MPUCLK
Signature · 1 line
2.34.0.rc2.393.gf8c9666880-goog
author Reviewed-by Heinrich Schuchardt on v2 2/11
#4 lore raw

Re: [PATCH v2 02/11] sandbox: Drop CONFIG_HOST_MAX_DEVICES

This can go in the related header file. Drop the CONFIG option.

---

(no changes since v1)

 cmd/host.c                   | 2 +-
 drivers/block/sandbox.c      | 6 +++---
 include/configs/sandbox.h    | 2 --
 include/sandboxblockdev.h    | 3 +++
 scripts/config_whitelist.txt | 1 -
 5 files changed, 7 insertions(+), 7 deletions(-)

Applied to u-boot-dm/next, thanks!

#5 lore raw

PATCH v2 3/11 Convert CONFIG_SYS_FDT_LOAD_ADDR to Kconfig

In reply to Simon Glass

This converts the following to Kconfig:
CONFIG_SYS_FDT_LOAD_ADDR

---

(no changes since v1)

 arch/sandbox/Kconfig         | 10 ++++++++++
 include/configs/sandbox.h    |  6 ------
 scripts/config_whitelist.txt |  1 -
 3 files changed, 10 insertions(+), 7 deletions(-)
arch/sandbox/Kconfig +10 -0
index 7606469c94e..7cdbaefb119 100644
@@ -68,4 +68,14 @@ config SANDBOX_BITS_PER_LONG
 	default 32 if HOST_32BIT
 	default 64 if HOST_64BIT
 
+config SYS_FDT_LOAD_ADDR
+	hex "Address at which to load devicetree"
+	default 0x100
+	help
+	  With sandbox the devicetree is loaded into the emulated RAM. This sets
+	  the address that is used. There must be enough space at this address
+	  to load the full devicetree without it overwriting anything else.
+
+	  See `doc/arch/sandbox.rst` for more information.
+
 endmenu
include/configs/sandbox.h +0 -6
index b1689d39f11..fd972b8c46d 100644
@@ -18,12 +18,6 @@
 
 #define CONFIG_SYS_CBSIZE		1024	/* Console I/O Buffer Size */
 
-/* turn on command-line edit/c/auto */
-
-/* SPI - enable all SPI flash types for testing purposes */
-
-#define CONFIG_SYS_FDT_LOAD_ADDR	        0x100
-
 #define CONFIG_PHYSMEM
 
 /* Size of our emulated memory */
scripts/config_whitelist.txt +0 -1
index 10f7a6d4c08..82a69a6c5f7 100644
@@ -1613,7 +1613,6 @@ CONFIG_SYS_FAST_CLK
 CONFIG_SYS_FAULT_ECHO_LINK_DOWN
 CONFIG_SYS_FAULT_MII_ADDR
 CONFIG_SYS_FDT_BASE
-CONFIG_SYS_FDT_LOAD_ADDR
 CONFIG_SYS_FDT_PAD
 CONFIG_SYS_FEC0_IOBASE
 CONFIG_SYS_FEC1_IOBASE
Signature · 1 line
2.34.0.rc2.393.gf8c9666880-goog
#6 lore raw

Re: [PATCH v2 03/11] Convert CONFIG_SYS_FDT_LOAD_ADDR to Kconfig

This converts the following to Kconfig:
CONFIG_SYS_FDT_LOAD_ADDR

---

(no changes since v1)

 arch/sandbox/Kconfig         | 10 ++++++++++
 include/configs/sandbox.h    |  6 ------
 scripts/config_whitelist.txt |  1 -
 3 files changed, 10 insertions(+), 7 deletions(-)

Applied to u-boot-dm/next, thanks!

#7 lore raw

PATCH v2 4/11 Convert CONFIG_PHYSMEM to Kconfig

In reply to Simon Glass

This converts the following to Kconfig:
CONFIG_PHYSMEM

---

Changes in v2:
- Use G instead of GB

 README                       |  8 --------
 arch/Kconfig                 |  2 ++
 include/configs/edison.h     |  3 ---
 include/configs/sandbox.h    |  2 --
 include/configs/x86-common.h |  2 --
 lib/Kconfig                  | 10 ++++++++++
 scripts/config_whitelist.txt |  1 -
 7 files changed, 12 insertions(+), 16 deletions(-)
README +0 -8
index 0e37358af1c..a324f82c44c 100644
@@ -1716,14 +1716,6 @@ The following options need to be configured:
 			HERMES, IP860, RPXlite, LWMON,
 			FLAGADM
 
-- Access to physical memory region (> 4GB)
-		Some basic support is provided for operations on memory not
-		normally accessible to U-Boot - e.g. some architectures
-		support access to more than 4GB of memory on 32-bit
-		machines using physical address extension or similar.
-		Define CONFIG_PHYSMEM to access this basic support, which
-		currently only supports clearing the memory.
-
 - Error Recovery:
 		CONFIG_NET_RETRY_COUNT
 
arch/Kconfig +2 -0
index 3e2cc84ab2c..1e0e6118139 100644
@@ -194,6 +194,7 @@ config SANDBOX
 	imply PHY_FIXED
 	imply DM_DSA
 	imply CMD_EXTENSION
+	imply PHYSMEM
 
 config SH
 	bool "SuperH architecture"
@@ -245,6 +246,7 @@ config X86
 	imply USB_ETHER_SMSC95XX
 	imply USB_HOST_ETHER
 	imply PCH
+	imply PHYSMEM
 	imply RTC_MC146818
 	imply ACPIGEN if !QEMU
 	imply SYSINFO if GENERATE_SMBIOS_TABLE
include/configs/edison.h +0 -3
index 3ec35db4bcf..02f33f3c29f 100644
@@ -14,9 +14,6 @@
 #define CONFIG_SYS_MAXARGS	128
 #define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE
 
-/* Memory */
-#define CONFIG_PHYSMEM
-
 #define CONFIG_SYS_STACK_SIZE			(32 * 1024)
 
 #define CONFIG_SYS_MONITOR_BASE			CONFIG_SYS_TEXT_BASE
include/configs/sandbox.h +0 -2
index fd972b8c46d..d1e47ed0b61 100644
@@ -18,8 +18,6 @@
 
 #define CONFIG_SYS_CBSIZE		1024	/* Console I/O Buffer Size */
 
-#define CONFIG_PHYSMEM
-
 /* Size of our emulated memory */
 #define SB_CONCAT(x, y) x ## y
 #define SB_TO_UL(s) SB_CONCAT(s, UL)
include/configs/x86-common.h +0 -2
index 486b5ca7765..33209fad4fc 100644
@@ -14,8 +14,6 @@
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_PHYSMEM
-
 #define CONFIG_SYS_BOOTM_LEN		(16 << 20)
 
 /* SATA AHCI storage */
lib/Kconfig +10 -0
index 70bf8e7a464..ccbf2e143c1 100644
@@ -15,6 +15,16 @@ config SYS_NUM_ADDR_MAP
 	help
 	  Sets the number of entries in the virtual-physical mapping table.
 
+config PHYSMEM
+	bool "Access to physical memory region (> 4G)"
+	help
+	  Some basic support is provided for operations on memory not
+	  normally accessible to 32-bit U-Boot - e.g. some architectures
+	  support access to more than 4G of memory on 32-bit
+	  machines using physical address extension or similar.
+	  Enable this to access this basic support, which only supports clearing
+	  the memory.
+
 config BCH
 	bool "Enable Software based BCH ECC"
 	help
scripts/config_whitelist.txt +0 -1
index 82a69a6c5f7..72391d4c456 100644
@@ -916,7 +916,6 @@ CONFIG_PCI_SYS_BUS
 CONFIG_PCI_SYS_PHYS
 CONFIG_PCI_SYS_SIZE
 CONFIG_PEN_ADDR_BIG_ENDIAN
-CONFIG_PHYSMEM
 CONFIG_PHY_BASE_ADR
 CONFIG_PHY_ET1011C_TX_CLK_FIX
 CONFIG_PHY_ID
Signature · 1 line
2.34.0.rc2.393.gf8c9666880-goog
#9 lore raw

Re: [PATCH v2 04/11] Convert CONFIG_PHYSMEM to Kconfig

Hi Andy,

Quoted 7 lines · Andy Shevchenko
Quoted 3 lines · Simon Glass

This converts the following to Kconfig:
CONFIG_PHYSMEM

Why?

Because we want to avoid ad-hoc CONFIG options.

Quoted 4 lines

And why my message [1] left unanswered?

[1]: https://lore.kernel.org/u-boot/CAHp75VcVpvuPWKjcuFwjcs0rOq7Woiz_CUD57vpzD5HF6SEzrg@mail.gmail.com/T/#u

Because I have not got to it yet. It can take me a week or more to catch up on email. I do it in batches.

We could enable this option always, but it is a bit risky as it doesn't work on 32-bit machines unless there is an implementation available.

Regards,
Simon

#10 lore raw

Re: [PATCH v2 04/11] Convert CONFIG_PHYSMEM to Kconfig

Quoted 10 lines · Simon Glass
Quoted 7 lines · Andy Shevchenko
Quoted 3 lines · Simon Glass

This converts the following to Kconfig:
CONFIG_PHYSMEM

Why?

Because we want to avoid ad-hoc CONFIG options.

I mean why to do this effort if it can be simply removed for good.

Quoted 10 lines
Quoted 3 lines

And why my message [1] left unanswered?

[1]: https://lore.kernel.org/u-boot/CAHp75VcVpvuPWKjcuFwjcs0rOq7Woiz_CUD57vpzD5HF6SEzrg@mail.gmail.com/T/#u

Because I have not got to it yet. It can take me a week or more to catch up on email. I do it in batches.

We could enable this option always, but it is a bit risky as it doesn't work on 32-bit machines unless there is an implementation available.

I haven't got this. It's always enabled on x86. And it seems the only user of it. I don't see any benefit of keeping this option.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#11 lore raw

Re: [PATCH v2 04/11] Convert CONFIG_PHYSMEM to Kconfig

Hi Andy,

Quoted 22 lines · Andy Shevchenko
Quoted 10 lines · Simon Glass
Quoted 7 lines · Andy Shevchenko
Quoted 3 lines · Simon Glass

This converts the following to Kconfig:
CONFIG_PHYSMEM

Why?

Because we want to avoid ad-hoc CONFIG options.

I mean why to do this effort if it can be simply removed for good.

Quoted 7 lines
Quoted 3 lines

And why my message [1] left unanswered?

[1]: https://lore.kernel.org/u-boot/CAHp75VcVpvuPWKjcuFwjcs0rOq7Woiz_CUD57vpzD5HF6SEzrg@mail.gmail.com/T/#u

Because I have not got to it yet. It can take me a week or more to catch up on email. I do it in batches.

Quoted 6 lines
Quoted 3 lines

We could enable this option always, but it is a bit risky as it doesn't work on 32-bit machines unless there is an implementation available.

I haven't got this. It's always enabled on x86. And it seems the only user of it. I don't see any benefit of keeping this option.

If it is only always enabled on x86 that means it is not on anything else. So the option (at present) compiles the physmem.c file only on x86 and sandbox. That is the purpose of the option.

I am not sure it would cause any harm to enable it for everything, but I'd rather just do the conversion. It's fine to look at things in a new light when we convert options, but that sort of change can easily be done later. The CONFIG conversion has been going on for 6 years, partly because people don't like touching old things, partly because people want them cleaned up...

Regards,
Simon

#12 lore raw

Re: [PATCH v2 04/11] Convert CONFIG_PHYSMEM to Kconfig

Hi Andy,

Quoted 22 lines · Andy Shevchenko
Quoted 10 lines · Simon Glass
Quoted 7 lines · Andy Shevchenko
Quoted 3 lines · Simon Glass

This converts the following to Kconfig:
CONFIG_PHYSMEM

Why?

Because we want to avoid ad-hoc CONFIG options.

I mean why to do this effort if it can be simply removed for good.

Quoted 7 lines
Quoted 3 lines

And why my message [1] left unanswered?

[1]: https://lore.kernel.org/u-boot/CAHp75VcVpvuPWKjcuFwjcs0rOq7Woiz_CUD57vpzD5HF6SEzrg@mail.gmail.com/T/#u

Because I have not got to it yet. It can take me a week or more to catch up on email. I do it in batches.

Quoted 6 lines
Quoted 3 lines

We could enable this option always, but it is a bit risky as it doesn't work on 32-bit machines unless there is an implementation available.

I haven't got this. It's always enabled on x86. And it seems the only user of it. I don't see any benefit of keeping this option.

If it is only always enabled on x86 that means it is not on anything else. So the option (at present) compiles the physmem.c file only on x86 and sandbox. That is the purpose of the option.

I am not sure it would cause any harm to enable it for everything, but I'd rather just do the conversion. It's fine to look at things in a new light when we convert options, but that sort of change can easily be done later. The CONFIG conversion has been going on for 6 years, partly because people don't like touching old things, partly because people want them cleaned up...

Regards,
Simon

Applied to u-boot-dm/next, thanks!

#13 lore raw

PATCH v2 5/11 sandbox: video: Drop CONFIG_LCD_BMP_RLE8

In reply to Simon Glass

This is not defined by any board except sandbox. Even sandbox doesn't actually use it since it has migrated to DM_VIDEO.

Drop this option. Remove the dead code also, for completeness, even though the whole lcd.c file will be dropped soon.

---

(no changes since v1)

 README                       |   4 -
 common/lcd.c                 | 142 -----------------------------------
 include/configs/sandbox.h    |   3 -
 scripts/config_whitelist.txt |   1 -
 4 files changed, 150 deletions(-)
README +0 -4
index a324f82c44c..7b03cf28c99 100644
@@ -1181,10 +1181,6 @@ The following options need to be configured:
 		If CONFIG_LCD_ROTATION is not defined, the console will be
 		initialized with 0degree rotation.
 
-		CONFIG_LCD_BMP_RLE8
-
-		Support drawing of RLE8-compressed bitmaps on the LCD.
-
 - MII/PHY support:
 		CONFIG_PHY_CLOCK_FREQ (ppc4xx)
 
common/lcd.c +0 -142

154 lines not on this page · raw message

include/configs/sandbox.h +0 -3
index d1e47ed0b61..53dc696e689 100644
@@ -40,9 +40,6 @@
 
 /* LCD and keyboard require SDL support */
 #ifdef CONFIG_SANDBOX_SDL
-#define LCD_BPP			LCD_COLOR16
-#define CONFIG_LCD_BMP_RLE8
-
 #define CONFIG_KEYBOARD
 #endif
 
scripts/config_whitelist.txt +0 -1
index 72391d4c456..cca9f074868 100644
@@ -697,7 +697,6 @@ CONFIG_LAYERSCAPE_NS_ACCESS
 CONFIG_LBA48
 CONFIG_LBDAF
 CONFIG_LCD_ALIGNMENT
-CONFIG_LCD_BMP_RLE8
 CONFIG_LCD_DT_SIMPLEFB
 CONFIG_LCD_INFO
 CONFIG_LCD_INFO_BELOW_LOGO
Signature · 1 line
2.34.0.rc2.393.gf8c9666880-goog
#14 lore raw

Re: [PATCH v2 05/11] sandbox: video: Drop CONFIG_LCD_BMP_RLE8

Hi Anatolij,

Quoted 10 lines · Simon Glass

This is not defined by any board except sandbox. Even sandbox doesn't actually use it since it has migrated to DM_VIDEO.

Drop this option. Remove the dead code also, for completeness, even though the whole lcd.c file will be dropped soon.

---

Quoted 7 lines

(no changes since v1)

 README                       |   4 -
 common/lcd.c                 | 142 -----------------------------------
 include/configs/sandbox.h    |   3 -
 scripts/config_whitelist.txt |   1 -
 4 files changed, 150 deletions(-)

Just checking if you are OK with this patch?

Also are you looking at removing lcd.c and cfb_console.c ?

Regards,
Simon

#15 lore raw

PATCH v2 6/11 Convert CONFIG_KEYBOARD to Kconfig

In reply to Simon Glass

This converts the following to Kconfig:
CONFIG_KEYBOARD

---

(no changes since v1)

 README                              | 8 --------
 arch/Kconfig                        | 1 +
 arch/arm/mach-exynos/Kconfig        | 1 +
 configs/chromebit_mickey_defconfig  | 1 +
 configs/chromebook_jerry_defconfig  | 1 +
 configs/chromebook_minnie_defconfig | 1 +
 configs/chromebook_speedy_defconfig | 1 +
 configs/novena_defconfig            | 1 +
 configs/smdk5250_defconfig          | 1 +
 configs/smdk5420_defconfig          | 1 +
 drivers/input/Kconfig               | 9 +++++++++
 include/configs/exynos5-dt-common.h | 3 ---
 include/configs/novena.h            | 1 -
 include/configs/sandbox.h           | 5 -----
 include/configs/smdk5250.h          | 1 -
 include/configs/smdk5420.h          | 2 --
 include/configs/veyron.h            | 2 --
 scripts/config_whitelist.txt        | 1 -
 18 files changed, 18 insertions(+), 23 deletions(-)
README +0 -8
index 7b03cf28c99..91eeaca96d2 100644
@@ -1076,14 +1076,6 @@ The following options need to be configured:
 - Keyboard Support:
 		See Kconfig help for available keyboard drivers.
 
-		CONFIG_KEYBOARD
-
-		Define this to enable a custom keyboard support.
-		This simply calls drv_keyboard_init() which must be
-		defined in your board-specific files. This option is deprecated
-		and is only used by novena. For new boards, use driver model
-		instead.
-
 - Video support:
 		CONFIG_FSL_DIU_FB
 		Enable the Freescale DIU video driver.	Reference boards for
arch/Kconfig +1 -0
index 1e0e6118139..b4cb19183e7 100644
@@ -195,6 +195,7 @@ config SANDBOX
 	imply DM_DSA
 	imply CMD_EXTENSION
 	imply PHYSMEM
+	imply KEYBOARD
 
 config SH
 	bool "SuperH architecture"
arch/arm/mach-exynos/Kconfig +1 -0
index 7f3aee57129..10301c10888 100644
@@ -23,6 +23,7 @@ config ARCH_EXYNOS5
 	imply CMD_HASH
 	imply CRC32_VERIFY
 	imply HASH_VERIFY
+	imply KEYBOARD
 	imply USB_ETHER_ASIX
 	imply USB_ETHER_RTL8152
 	imply USB_ETHER_SMSC95XX
configs/chromebit_mickey_defconfig +1 -0
index 80ed1f0a145..62b54d95b14 100644
@@ -61,6 +61,7 @@ CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_SYS_I2C_ROCKCHIP=y
 CONFIG_I2C_MUX=y
 CONFIG_DM_KEYBOARD=y
+CONFIG_KEYBOARD=y
 CONFIG_CROS_EC_KEYB=y
 CONFIG_CROS_EC=y
 CONFIG_CROS_EC_SPI=y
configs/chromebook_jerry_defconfig +1 -0
index 85f612093df..a9f81e3c09a 100644
@@ -63,6 +63,7 @@ CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_SYS_I2C_ROCKCHIP=y
 CONFIG_I2C_MUX=y
 CONFIG_DM_KEYBOARD=y
+CONFIG_KEYBOARD=y
 CONFIG_CROS_EC_KEYB=y
 CONFIG_CROS_EC=y
 CONFIG_CROS_EC_SPI=y
configs/chromebook_minnie_defconfig +1 -0
index 41a3fe1a3c5..1e87b118744 100644
@@ -63,6 +63,7 @@ CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_SYS_I2C_ROCKCHIP=y
 CONFIG_I2C_MUX=y
 CONFIG_DM_KEYBOARD=y
+CONFIG_KEYBOARD=y
 CONFIG_CROS_EC_KEYB=y
 CONFIG_CROS_EC=y
 CONFIG_CROS_EC_SPI=y
configs/chromebook_speedy_defconfig +1 -0
index b396d9f7055..f1ccdc4572c 100644
@@ -62,6 +62,7 @@ CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_SYS_I2C_ROCKCHIP=y
 CONFIG_I2C_MUX=y
 CONFIG_DM_KEYBOARD=y
+CONFIG_KEYBOARD=y
 CONFIG_CROS_EC_KEYB=y
 CONFIG_CROS_EC=y
 CONFIG_CROS_EC_SPI=y
configs/novena_defconfig +1 -0
index 06864db00d5..e40e80e203c 100644
@@ -60,6 +60,7 @@ CONFIG_DWC_AHSATA=y
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SPL_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_MXC=y
+CONFIG_KEYBOARD=y
 CONFIG_FSL_USDHC=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_MICREL=y
configs/smdk5250_defconfig +1 -0
index 9429114932c..f8350bfffc4 100644
@@ -43,6 +43,7 @@ CONFIG_USE_ENV_SPI_BUS=y
 CONFIG_ENV_SPI_BUS=1
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_I2C_S3C24X0=y
+# CONFIG_KEYBOARD is not set
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_MMC_DW=y
 CONFIG_MMC_SDHCI=y
configs/smdk5420_defconfig +1 -0
index e62f432e43a..a9924a46c3f 100644
@@ -38,6 +38,7 @@ CONFIG_USE_ENV_SPI_BUS=y
 CONFIG_ENV_SPI_BUS=1
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_I2C_S3C24X0=y
+# CONFIG_KEYBOARD is not set
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_MMC_DW=y
 CONFIG_MMC_SDHCI=y
drivers/input/Kconfig +9 -0
index a17e55e9972..0b753f37bf4 100644
@@ -38,6 +38,15 @@ config TPL_DM_KEYBOARD
 	  includes methods to start/stop the device, check for available
 	  input and update LEDs if the keyboard has them.
 
+config KEYBOARD
+	bool "Enable legacy keyboard support (deprecated)"
+	help
+	  Enable this to enable a custom keyboard support.
+	  This simply calls drv_keyboard_init() which must be
+	  defined in your board-specific files. This option is deprecated
+	  and is only used by novena. For new boards, use driver model
+	  instead.
+
 config CROS_EC_KEYB
 	bool "Enable Chrome OS EC keyboard support"
 	depends on INPUT
include/configs/exynos5-dt-common.h +0 -3
index cc9ffda669e..00b67787d9e 100644
@@ -30,7 +30,4 @@
 #define LCD_BPP			LCD_COLOR16
 #endif
 
-/* Enable keyboard */
-#define CONFIG_KEYBOARD
-
 #endif
include/configs/novena.h +0 -1
index 28fb1b8d753..f09b868d438 100644
@@ -9,7 +9,6 @@
 #define __CONFIG_H
 
 /* System configurations */
-#define CONFIG_KEYBOARD
 
 #include "mx6_common.h"
 
include/configs/sandbox.h +0 -5
index 53dc696e689..2307657f5bd 100644
@@ -38,11 +38,6 @@
 #define CONFIG_SANDBOX_SDL
 #endif
 
-/* LCD and keyboard require SDL support */
-#ifdef CONFIG_SANDBOX_SDL
-#define CONFIG_KEYBOARD
-#endif
-
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_SYS_IDE_MAXBUS		1
 #define CONFIG_SYS_ATA_IDE0_OFFSET	0
include/configs/smdk5250.h +0 -1
index 3af13673f2a..d7e86f2f764 100644
@@ -14,7 +14,6 @@
 
 #undef CONFIG_EXYNOS_FB
 #undef CONFIG_EXYNOS_DP
-#undef CONFIG_KEYBOARD
 
 #define CONFIG_BOARD_COMMON
 
include/configs/smdk5420.h +0 -2
index d06dfe43a23..38691b63daf 100644
@@ -15,8 +15,6 @@
 #undef CONFIG_EXYNOS_FB
 #undef CONFIG_EXYNOS_DP
 
-#undef CONFIG_KEYBOARD
-
 #define CONFIG_BOARD_COMMON
 
 #define CONFIG_SMDK5420			/* which is in a SMDK5420 */
include/configs/veyron.h +0 -2
index 2ab6d6c6aac..ce9441d71f0 100644
@@ -13,6 +13,4 @@
 
 #include <configs/rk3288_common.h>
 
-#define CONFIG_KEYBOARD
-
 #endif
scripts/config_whitelist.txt +0 -1
index cca9f074868..74d52c871fc 100644
@@ -642,7 +642,6 @@ CONFIG_JFFS2_SUMMARY
 CONFIG_JRSTARTR_JR0
 CONFIG_JTAG_CONSOLE
 CONFIG_KEEP_SERVERADDR
-CONFIG_KEYBOARD
 CONFIG_KEY_REVOCATION
 CONFIG_KIRKWOOD_EGIGA_INIT
 CONFIG_KIRKWOOD_GPIO
Signature · 1 line
2.34.0.rc2.393.gf8c9666880-goog
#16 lore raw

Re: [PATCH v2 06/11] Convert CONFIG_KEYBOARD to Kconfig

This converts the following to Kconfig:
CONFIG_KEYBOARD

---

(no changes since v1)

 README                              | 8 --------
 arch/Kconfig                        | 1 +
 arch/arm/mach-exynos/Kconfig        | 1 +
 configs/chromebit_mickey_defconfig  | 1 +
 configs/chromebook_jerry_defconfig  | 1 +
 configs/chromebook_minnie_defconfig | 1 +
 configs/chromebook_speedy_defconfig | 1 +
 configs/novena_defconfig            | 1 +
 configs/smdk5250_defconfig          | 1 +
 configs/smdk5420_defconfig          | 1 +
 drivers/input/Kconfig               | 9 +++++++++
 include/configs/exynos5-dt-common.h | 3 ---
 include/configs/novena.h            | 1 -
 include/configs/sandbox.h           | 5 -----
 include/configs/smdk5250.h          | 1 -
 include/configs/smdk5420.h          | 2 --
 include/configs/veyron.h            | 2 --
 scripts/config_whitelist.txt        | 1 -
 18 files changed, 18 insertions(+), 23 deletions(-)

Applied to u-boot-dm/next, thanks!

#17 lore raw

PATCH v2 7/11 keyboard: Add a migration message

In reply to Simon Glass

A few boards still use the old keyboard mechanism. Set a deadline for them to update to driver model.

---

(no changes since v1)

 Makefile                               | 1 +
 doc/develop/driver-model/migration.rst | 8 ++++++++
 2 files changed, 9 insertions(+)
Makefile +1 -0
index 338ae3341e6..a9fa443bc22 100644
@@ -1123,6 +1123,7 @@ endif
 		$(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG))
 	$(call deprecated,CONFIG_DM_ETH,Ethernet drivers,v2020.07,$(CONFIG_NET))
 	$(call deprecated,CONFIG_DM_I2C,I2C drivers,v2022.04,$(CONFIG_SYS_I2C_LEGACY))
+	$(call deprecated,CONFIG_DM_KEYBOARD,Keyboard drivers,v2022.10,$(CONFIG_KEYBOARD))
 	@# Check that this build does not use CONFIG options that we do not
 	@# know about unless they are in Kconfig. All the existing CONFIG
 	@# options are whitelisted, so new ones should not be added.
doc/develop/driver-model/migration.rst +8 -0
index 8bb8601c582..3dbeea6537c 100644
@@ -98,3 +98,11 @@ Deadline: 2021.10
 The I2C subsystem has supported the driver model since early 2015.
 Maintainers should submit patches switching over to using CONFIG_DM_I2C and
 other base driver model options in time for inclusion in the 2021.10 release.
+
+CONFIG_KEYBOARD
+---------------
+Deadline: 2022.10
+
+This is a legacy option which has been replaced by driver model.
+Maintainers should submit patches switching over to using CONFIG_DM_KEYBOARD and
+other base driver model options in time for inclusion in the 2022.10 release.
Signature · 1 line
2.34.0.rc2.393.gf8c9666880-goog
#18 lore raw

Re: [PATCH v2 07/11] keyboard: Add a migration message

A few boards still use the old keyboard mechanism. Set a deadline for them to update to driver model.

---

(no changes since v1)

 Makefile                               | 1 +
 doc/develop/driver-model/migration.rst | 8 ++++++++
 2 files changed, 9 insertions(+)

Applied to u-boot-dm/next, thanks!

#19 lore raw

PATCH v2 8/11 sandbox: Drop CONFIG_SYS_TIMER_RATE

In reply to Simon Glass

This is not used by sandbox since it uses driver model for the timer.

Drop it.

Also update the tools_only build to avoid build errors, since it does actually build U-Boot too. Enable DM so we can use CONFIG_TIMER, disable EFI_LOADER to avoid an error about board_quiesce_devices() and disable NET to avoid having to define CONFIG_AVB_BUF_ADDR

---

(no changes since v1)

 configs/tools-only_defconfig | 7 +++----
 include/configs/sandbox.h    | 4 ----
 2 files changed, 3 insertions(+), 8 deletions(-)
configs/tools-only_defconfig +3 -4
index f482c9a1c1b..ec5d1346cec 100644
@@ -11,23 +11,22 @@ CONFIG_MISC_INIT_F=y
 # CONFIG_CMD_BOOTM is not set
 # CONFIG_CMD_ELF is not set
 # CONFIG_CMD_EXTENSION is not set
-CONFIG_BOOTP_DNS2=y
 # CONFIG_CMD_DATE is not set
 CONFIG_OF_CONTROL=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_BOOTP_SEND_HOSTNAME=y
-CONFIG_IP_DEFRAG=y
+# CONFIG_NET is not set
 # CONFIG_ACPIGEN is not set
 CONFIG_AXI=y
 CONFIG_AXI_SANDBOX=y
-# CONFIG_UDP_FUNCTION_FASTBOOT is not set
 CONFIG_SANDBOX_GPIO=y
 CONFIG_PCI=y
 CONFIG_PCI_SANDBOX=y
 CONFIG_DM_RTC=y
 CONFIG_SOUND=y
 CONFIG_SYSRESET=y
+CONFIG_TIMER=y
 CONFIG_I2C_EDID=y
 # CONFIG_VIRTIO_MMIO is not set
 # CONFIG_VIRTIO_PCI is not set
 # CONFIG_VIRTIO_SANDBOX is not set
+# CONFIG_EFI_LOADER is not set
include/configs/sandbox.h +0 -4
index 2307657f5bd..cd7d99ec69c 100644
@@ -10,10 +10,6 @@
 #define CONFIG_IO_TRACE
 #endif
 
-#ifndef CONFIG_TIMER
-#define CONFIG_SYS_TIMER_RATE		1000000
-#endif
-
 #define CONFIG_MALLOC_F_ADDR		0x0010000
 
 #define CONFIG_SYS_CBSIZE		1024	/* Console I/O Buffer Size */
Signature · 1 line
2.34.0.rc2.393.gf8c9666880-goog
#20 lore raw

Re: [PATCH v2 08/11] sandbox: Drop CONFIG_SYS_TIMER_RATE

This is not used by sandbox since it uses driver model for the timer.

Drop it.

Also update the tools_only build to avoid build errors, since it does actually build U-Boot too. Enable DM so we can use CONFIG_TIMER, disable EFI_LOADER to avoid an error about board_quiesce_devices() and disable NET to avoid having to define CONFIG_AVB_BUF_ADDR

---

(no changes since v1)

 configs/tools-only_defconfig | 7 +++----
 include/configs/sandbox.h    | 4 ----
 2 files changed, 3 insertions(+), 8 deletions(-)

Applied to u-boot-dm/next, thanks!

#21 lore raw

PATCH v2 9/11 ide: Drop unused CONFIG options

In reply to Simon Glass

CONFIG_SYS_ATA_PORT_ADDR is not used in the code anymore. Drop it and use ATA_PORT_ADDR() locally instead.

Drop CONFIG_IDE_RESET_ROUTINE and CONFIG_IDE_SWAP_IO which are also unused.

---

(no changes since v1)

 README                                       |  3 ---
 arch/arm/mach-kirkwood/include/mach/config.h |  2 --
 arch/powerpc/include/asm/config.h            |  3 ---
 drivers/block/ide.c                          | 12 +++++-------
 include/configs/edminiv2.h                   |  2 --
 include/configs/r2dplus.h                    |  1 -
 scripts/config_whitelist.txt                 |  2 --
 7 files changed, 5 insertions(+), 20 deletions(-)
README +0 -3
index 91eeaca96d2..715d693f1d6 100644
@@ -785,9 +785,6 @@ The following options need to be configured:
 		least one non-MTD partition type as well.
 
 - IDE Reset method:
-		CONFIG_IDE_RESET_ROUTINE - this is defined in several
-		board configurations files but used nowhere!
-
 		CONFIG_IDE_RESET - is this is defined, IDE Reset will
 		be performed by calling the function
 			ide_set_reset(int reset)
arch/arm/mach-kirkwood/include/mach/config.h +0 -2
index cf6b1b9b634..9fd90611bd9 100644
@@ -67,8 +67,6 @@
  */
 #ifdef CONFIG_IDE
 #define __io
-/* Needs byte-swapping for ATA data register */
-#define CONFIG_IDE_SWAP_IO
 /* Data, registers and alternate blocks are at the same offset */
 #define CONFIG_SYS_ATA_DATA_OFFSET	(0x0100)
 #define CONFIG_SYS_ATA_REG_OFFSET	(0x0100)
arch/powerpc/include/asm/config.h +0 -3
index a97b72de1b8..354137124d8 100644
@@ -51,9 +51,6 @@
 
 /* The FMAN driver uses the PHYLIB infrastructure */
 
-/* All PPC boards must swap IDE bytes */
-#define CONFIG_IDE_SWAP_IO
-
 #if defined(CONFIG_DM_SERIAL) && !defined(CONFIG_CLK_MPC83XX)
 /*
  * TODO: Convert this to a clock driver exists that can give us the UART
drivers/block/ide.c +5 -7
index c99076c6f45..5b9fb821e06 100644
@@ -45,9 +45,7 @@ struct blk_desc ide_dev_desc[CONFIG_SYS_IDE_MAXDEVICE];
 
 #define IDE_SPIN_UP_TIME_OUT 5000 /* 5 sec spin-up timeout */
 
-#ifndef CONFIG_SYS_ATA_PORT_ADDR
-#define CONFIG_SYS_ATA_PORT_ADDR(port) (port)
-#endif
+#define ATA_PORT_ADDR(port) (port)
 
 #ifdef CONFIG_IDE_RESET
 extern void ide_set_reset(int idereset);
@@ -679,7 +677,7 @@ __weak void ide_outb(int dev, int port, unsigned char val)
 {
 	debug("ide_outb (dev= %d, port= 0x%x, val= 0x%02x) : @ 0x%08lx\n",
 	      dev, port, val,
-	      (ATA_CURR_BASE(dev) + CONFIG_SYS_ATA_PORT_ADDR(port)));
+	      (ATA_CURR_BASE(dev) + ATA_PORT_ADDR(port)));
 
 #if defined(CONFIG_IDE_AHB)
 	if (port) {
@@ -690,7 +688,7 @@ __weak void ide_outb(int dev, int port, unsigned char val)
 		outb(val, (ATA_CURR_BASE(dev)));
 	}
 #else
-	outb(val, (ATA_CURR_BASE(dev) + CONFIG_SYS_ATA_PORT_ADDR(port)));
+	outb(val, (ATA_CURR_BASE(dev) + ATA_PORT_ADDR(port)));
 #endif
 }
 
@@ -701,12 +699,12 @@ __weak unsigned char ide_inb(int dev, int port)
 #if defined(CONFIG_IDE_AHB)
 	val = ide_read_register(dev, port);
 #else
-	val = inb((ATA_CURR_BASE(dev) + CONFIG_SYS_ATA_PORT_ADDR(port)));
+	val = inb((ATA_CURR_BASE(dev) + ATA_PORT_ADDR(port)));
 #endif
 
 	debug("ide_inb (dev= %d, port= 0x%x) : @ 0x%08lx -> 0x%02x\n",
 	      dev, port,
-	      (ATA_CURR_BASE(dev) + CONFIG_SYS_ATA_PORT_ADDR(port)), val);
+	      (ATA_CURR_BASE(dev) + ATA_PORT_ADDR(port)), val);
 	return val;
 }
 
include/configs/edminiv2.h +0 -2
index 664d6d1f340..6b487b310cc 100644
@@ -113,8 +113,6 @@
  */
 #ifdef CONFIG_IDE
 #define __io
-/* Needs byte-swapping for ATA data register */
-#define CONFIG_IDE_SWAP_IO
 /* Data, registers and alternate blocks are at the same offset */
 #define CONFIG_SYS_ATA_DATA_OFFSET	(0x0100)
 #define CONFIG_SYS_ATA_REG_OFFSET	(0x0100)
include/configs/r2dplus.h +0 -1
index 58ca6c28b53..1dd83dbf64d 100644
@@ -44,7 +44,6 @@
 #define CONFIG_SYS_ATA_DATA_OFFSET	0x1000	/* data reg offset */
 #define CONFIG_SYS_ATA_REG_OFFSET	0x1000	/* reg offset */
 #define CONFIG_SYS_ATA_ALT_OFFSET	0x800	/* alternate register offset */
-#define CONFIG_IDE_SWAP_IO
 
 /*
  * SuperH PCI Bridge Configration
scripts/config_whitelist.txt +0 -2
index 74d52c871fc..e34643ba527 100644
@@ -605,7 +605,6 @@ CONFIG_ICACHE
 CONFIG_ICS307_REFCLK_HZ
 CONFIG_IDE_PREINIT
 CONFIG_IDE_RESET
-CONFIG_IDE_SWAP_IO
 CONFIG_IMA
 CONFIG_IMX
 CONFIG_IMX6_PWM_PER_CLK
@@ -1231,7 +1230,6 @@ CONFIG_SYS_ATA_BASE_ADDR
 CONFIG_SYS_ATA_DATA_OFFSET
 CONFIG_SYS_ATA_IDE0_OFFSET
 CONFIG_SYS_ATA_IDE1_OFFSET
-CONFIG_SYS_ATA_PORT_ADDR
 CONFIG_SYS_ATA_REG_OFFSET
 CONFIG_SYS_ATA_STRIDE
 CONFIG_SYS_ATMEL_CPU_NAME
Signature · 1 line
2.34.0.rc2.393.gf8c9666880-goog
#22 lore raw

PATCH v2 10/11 ide: Drop ATA_PORT_ADDR

In reply to Simon Glass

This is not needed anymore. Drop it to simplify the code.

---

Changes in v2:
- Add new patch to drop ATA_PORT_ADDR

 drivers/block/ide.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
drivers/block/ide.c +4 -8
index 5b9fb821e06..085aa356fee 100644
@@ -45,8 +45,6 @@ struct blk_desc ide_dev_desc[CONFIG_SYS_IDE_MAXDEVICE];
 
 #define IDE_SPIN_UP_TIME_OUT 5000 /* 5 sec spin-up timeout */
 
-#define ATA_PORT_ADDR(port) (port)
-
 #ifdef CONFIG_IDE_RESET
 extern void ide_set_reset(int idereset);
 
@@ -676,8 +674,7 @@ static void ide_ident(struct blk_desc *dev_desc)
 __weak void ide_outb(int dev, int port, unsigned char val)
 {
 	debug("ide_outb (dev= %d, port= 0x%x, val= 0x%02x) : @ 0x%08lx\n",
-	      dev, port, val,
-	      (ATA_CURR_BASE(dev) + ATA_PORT_ADDR(port)));
+	      dev, port, val, ATA_CURR_BASE(dev) + port);
 
 #if defined(CONFIG_IDE_AHB)
 	if (port) {
@@ -688,7 +685,7 @@ __weak void ide_outb(int dev, int port, unsigned char val)
 		outb(val, (ATA_CURR_BASE(dev)));
 	}
 #else
-	outb(val, (ATA_CURR_BASE(dev) + ATA_PORT_ADDR(port)));
+	outb(val, ATA_CURR_BASE(dev) + port);
 #endif
 }
 
@@ -699,12 +696,11 @@ __weak unsigned char ide_inb(int dev, int port)
 #if defined(CONFIG_IDE_AHB)
 	val = ide_read_register(dev, port);
 #else
-	val = inb((ATA_CURR_BASE(dev) + ATA_PORT_ADDR(port)));
+	val = inb(ATA_CURR_BASE(dev) + port);
 #endif
 
 	debug("ide_inb (dev= %d, port= 0x%x) : @ 0x%08lx -> 0x%02x\n",
-	      dev, port,
-	      (ATA_CURR_BASE(dev) + ATA_PORT_ADDR(port)), val);
+	      dev, port, ATA_CURR_BASE(dev) + port, val);
 	return val;
 }
 
Signature · 1 line
2.34.0.rc2.393.gf8c9666880-goog
#24 lore raw

PATCH v2 11/11 timer: Add a migration message

In reply to Simon Glass

Some boards still use the old timer mechanism. Set a deadline for them to update to driver model.

This needs a bit of a strange rule to avoid an error on some boards.

---

(no changes since v1)

 Makefile                               | 4 ++++
 doc/develop/driver-model/migration.rst | 8 ++++++++
 2 files changed, 12 insertions(+)
Makefile +4 -0
index a9fa443bc22..22eb11e27f3 100644
@@ -1124,6 +1124,10 @@ endif
 	$(call deprecated,CONFIG_DM_ETH,Ethernet drivers,v2020.07,$(CONFIG_NET))
 	$(call deprecated,CONFIG_DM_I2C,I2C drivers,v2022.04,$(CONFIG_SYS_I2C_LEGACY))
 	$(call deprecated,CONFIG_DM_KEYBOARD,Keyboard drivers,v2022.10,$(CONFIG_KEYBOARD))
+	@# CONFIG_SYS_TIMER_RATE has brackets in it for some boards which
+	@# confuses this rule. Use if() to send just a single character which
+	@# is enable to tell 'deprecated' that one of these symbols exists
+	$(call deprecated,CONFIG_TIMER,Timer drivers,v2022.10,$(if $(strip $(CONFIG_SYS_TIMER_RATE)$(CONFIG_SYS_TIMER_COUNTER)),x))
 	@# Check that this build does not use CONFIG options that we do not
 	@# know about unless they are in Kconfig. All the existing CONFIG
 	@# options are whitelisted, so new ones should not be added.
doc/develop/driver-model/migration.rst +8 -0
index 3dbeea6537c..609818a35a8 100644
@@ -106,3 +106,11 @@ Deadline: 2022.10
 This is a legacy option which has been replaced by driver model.
 Maintainers should submit patches switching over to using CONFIG_DM_KEYBOARD and
 other base driver model options in time for inclusion in the 2022.10 release.
+
+CONFIG_SYS_TIMER_RATE and CONFIG_SYS_TIMER_COUNTER
+--------------------------------------------------
+Deadline: 2022.10
+
+These are legacy options which have been replaced by driver model.
+Maintainers should submit patches switching over to using CONFIG_TIMER and
+other base driver model options in time for inclusion in the 2022.10 release.
Signature · 1 line
2.34.0.rc2.393.gf8c9666880-goog
#25 lore raw

Re: [PATCH v2 11/11] timer: Add a migration message

Some boards still use the old timer mechanism. Set a deadline for them to update to driver model.

This needs a bit of a strange rule to avoid an error on some boards.

---

(no changes since v1)

 Makefile                               | 4 ++++
 doc/develop/driver-model/migration.rst | 8 ++++++++
 2 files changed, 12 insertions(+)

Applied to u-boot-dm/next, thanks!