[PATCH v2 00/11] 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(-)

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.
Signed-off-by: Simon Glass sjg@chromium.org ---
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(-)
diff --git a/cmd/Kconfig b/cmd/Kconfig index 5b30b13e438..fd8f0227c89 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -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 diff --git a/doc/develop/trace.rst b/doc/develop/trace.rst index 7776c484286..843bc1f18ad 100644 --- a/doc/develop/trace.rst +++ b/doc/develop/trace.rst @@ -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:

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.
Signed-off-by: Simon Glass sjg@chromium.org ---
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!

This can go in the related header file. Drop the CONFIG option.
Signed-off-by: Simon Glass sjg@chromium.org Reviewed-by: Heinrich Schuchardt xypron.glpk@gmx.de ---
(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(-)
diff --git a/cmd/host.c b/cmd/host.c index 2e998abbcdc..f0d989ac0f9 100644 --- a/cmd/host.c +++ b/cmd/host.c @@ -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]; diff --git a/drivers/block/sandbox.c b/drivers/block/sandbox.c index 1c2c3b4f886..53925ce9b69 100644 --- a/drivers/block/sandbox.c +++ b/drivers/block/sandbox.c @@ -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 diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index cc3a7ff05e4..b1689d39f11 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -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 */ diff --git a/include/sandboxblockdev.h b/include/sandboxblockdev.h index 4006e942a02..4ca9554e38a 100644 --- a/include/sandboxblockdev.h +++ b/include/sandboxblockdev.h @@ -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; diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index b9c1c61e13d..10f7a6d4c08 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -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

This can go in the related header file. Drop the CONFIG option.
Signed-off-by: Simon Glass sjg@chromium.org Reviewed-by: Heinrich Schuchardt xypron.glpk@gmx.de ---
(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!

This converts the following to Kconfig: CONFIG_SYS_FDT_LOAD_ADDR
Signed-off-by: Simon Glass sjg@chromium.org ---
(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(-)
diff --git a/arch/sandbox/Kconfig b/arch/sandbox/Kconfig index 7606469c94e..7cdbaefb119 100644 --- a/arch/sandbox/Kconfig +++ b/arch/sandbox/Kconfig @@ -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 diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index b1689d39f11..fd972b8c46d 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -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 */ diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 10f7a6d4c08..82a69a6c5f7 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -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

This converts the following to Kconfig: CONFIG_SYS_FDT_LOAD_ADDR
Signed-off-by: Simon Glass sjg@chromium.org ---
(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!

This converts the following to Kconfig: CONFIG_PHYSMEM
Signed-off-by: Simon Glass sjg@chromium.org Suggested-by: Sean Anderson seanga2@gmail.com ---
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(-)
diff --git a/README b/README index 0e37358af1c..a324f82c44c 100644 --- a/README +++ b/README @@ -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
diff --git a/arch/Kconfig b/arch/Kconfig index 3e2cc84ab2c..1e0e6118139 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -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 diff --git a/include/configs/edison.h b/include/configs/edison.h index 3ec35db4bcf..02f33f3c29f 100644 --- a/include/configs/edison.h +++ b/include/configs/edison.h @@ -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 diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index fd972b8c46d..d1e47ed0b61 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -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) diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h index 486b5ca7765..33209fad4fc 100644 --- a/include/configs/x86-common.h +++ b/include/configs/x86-common.h @@ -14,8 +14,6 @@ * High Level Configuration Options * (easy to change) */ -#define CONFIG_PHYSMEM - #define CONFIG_SYS_BOOTM_LEN (16 << 20)
/* SATA AHCI storage */ diff --git a/lib/Kconfig b/lib/Kconfig index 70bf8e7a464..ccbf2e143c1 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -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 diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 82a69a6c5f7..72391d4c456 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -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

On Wed, Nov 24, 2021 at 6:28 PM Simon Glass sjg@chromium.org wrote:
This converts the following to Kconfig: CONFIG_PHYSMEM
Why?
And why my message [1] left unanswered?
[1]: https://lore.kernel.org/u-boot/CAHp75VcVpvuPWKjcuFwjcs0rOq7Woiz_CUD57vpzD5HF...

Hi Andy,
On Wed, 24 Nov 2021 at 09:33, Andy Shevchenko andy.shevchenko@gmail.com wrote:
On Wed, Nov 24, 2021 at 6:28 PM Simon Glass sjg@chromium.org wrote:
This converts the following to Kconfig: CONFIG_PHYSMEM
Why?
Because we want to avoid ad-hoc CONFIG options.
And why my message [1] left unanswered?
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

On Thu, Nov 25, 2021 at 2:12 AM Simon Glass sjg@chromium.org wrote:
On Wed, 24 Nov 2021 at 09:33, Andy Shevchenko andy.shevchenko@gmail.com wrote:
On Wed, Nov 24, 2021 at 6:28 PM Simon Glass sjg@chromium.org wrote:
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.
And why my message [1] left unanswered?
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.

Hi Andy,
On Fri, 26 Nov 2021 at 09:08, Andy Shevchenko andy.shevchenko@gmail.com wrote:
On Thu, Nov 25, 2021 at 2:12 AM Simon Glass sjg@chromium.org wrote:
On Wed, 24 Nov 2021 at 09:33, Andy Shevchenko andy.shevchenko@gmail.com wrote:
On Wed, Nov 24, 2021 at 6:28 PM Simon Glass sjg@chromium.org wrote:
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.
And why my message [1] left unanswered?
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.
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

Hi Andy,
On Fri, 26 Nov 2021 at 09:08, Andy Shevchenko andy.shevchenko@gmail.com wrote:
On Thu, Nov 25, 2021 at 2:12 AM Simon Glass sjg@chromium.org wrote:
On Wed, 24 Nov 2021 at 09:33, Andy Shevchenko andy.shevchenko@gmail.com wrote:
On Wed, Nov 24, 2021 at 6:28 PM Simon Glass sjg@chromium.org wrote:
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.
And why my message [1] left unanswered?
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.
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!

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.
Signed-off-by: Simon Glass sjg@chromium.org ---
(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(-)
diff --git a/README b/README index a324f82c44c..7b03cf28c99 100644 --- a/README +++ b/README @@ -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)
diff --git a/common/lcd.c b/common/lcd.c index 16a0a7cea8f..02973721051 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -399,135 +399,6 @@ static void splash_align_axis(int *axis, unsigned long panel_size, } #endif
-#ifdef CONFIG_LCD_BMP_RLE8 -#define BMP_RLE8_ESCAPE 0 -#define BMP_RLE8_EOL 0 -#define BMP_RLE8_EOBMP 1 -#define BMP_RLE8_DELTA 2 - -static void draw_unencoded_bitmap(ushort **fbp, uchar *bmap, ushort *cmap, - int cnt) -{ - while (cnt > 0) { - *(*fbp)++ = cmap[*bmap++]; - cnt--; - } -} - -static void draw_encoded_bitmap(ushort **fbp, ushort c, int cnt) -{ - ushort *fb = *fbp; - int cnt_8copy = cnt >> 3; - - cnt -= cnt_8copy << 3; - while (cnt_8copy > 0) { - *fb++ = c; - *fb++ = c; - *fb++ = c; - *fb++ = c; - *fb++ = c; - *fb++ = c; - *fb++ = c; - *fb++ = c; - cnt_8copy--; - } - while (cnt > 0) { - *fb++ = c; - cnt--; - } - *fbp = fb; -} - -/* - * Do not call this function directly, must be called from lcd_display_bitmap. - */ -static void lcd_display_rle8_bitmap(struct bmp_image *bmp, ushort *cmap, - uchar *fb, int x_off, int y_off) -{ - uchar *bmap; - ulong width, height; - ulong cnt, runlen; - int x, y; - int decode = 1; - - width = get_unaligned_le32(&bmp->header.width); - height = get_unaligned_le32(&bmp->header.height); - bmap = (uchar *)bmp + get_unaligned_le32(&bmp->header.data_offset); - - x = 0; - y = height - 1; - - while (decode) { - if (bmap[0] == BMP_RLE8_ESCAPE) { - switch (bmap[1]) { - case BMP_RLE8_EOL: - /* end of line */ - bmap += 2; - x = 0; - y--; - /* 16bpix, 2-byte per pixel, width should *2 */ - fb -= (width * 2 + lcd_line_length); - break; - case BMP_RLE8_EOBMP: - /* end of bitmap */ - decode = 0; - break; - case BMP_RLE8_DELTA: - /* delta run */ - x += bmap[2]; - y -= bmap[3]; - /* 16bpix, 2-byte per pixel, x should *2 */ - fb = (uchar *) (lcd_base + (y + y_off - 1) - * lcd_line_length + (x + x_off) * 2); - bmap += 4; - break; - default: - /* unencoded run */ - runlen = bmap[1]; - bmap += 2; - if (y < height) { - if (x < width) { - if (x + runlen > width) - cnt = width - x; - else - cnt = runlen; - draw_unencoded_bitmap( - (ushort **)&fb, - bmap, cmap, cnt); - } - x += runlen; - } - bmap += runlen; - if (runlen & 1) - bmap++; - } - } else { - /* encoded run */ - if (y < height) { - runlen = bmap[0]; - if (x < width) { - /* aggregate the same code */ - while (bmap[0] == 0xff && - bmap[2] != BMP_RLE8_ESCAPE && - bmap[1] == bmap[3]) { - runlen += bmap[2]; - bmap += 2; - } - if (x + runlen > width) - cnt = width - x; - else - cnt = runlen; - draw_encoded_bitmap((ushort **)&fb, - cmap[bmap[1]], cnt); - } - x += runlen; - } - bmap += 2; - } - } -} -#endif - __weak void fb_put_byte(uchar **fb, uchar **from) { *(*fb)++ = *(*from)++; @@ -633,19 +504,6 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) case 1: case 8: { cmap_base = configuration_get_cmap(); -#ifdef CONFIG_LCD_BMP_RLE8 - u32 compression = get_unaligned_le32(&bmp->header.compression); - debug("compressed %d %d\n", compression, BMP_BI_RLE8); - if (compression == BMP_BI_RLE8) { - if (bpix != 16) { - /* TODO implement render code for bpix != 16 */ - printf("Error: only support 16 bpix"); - return 1; - } - lcd_display_rle8_bitmap(bmp, cmap_base, fb, x, y); - break; - } -#endif
if (bpix != 16) byte_width = width; diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index d1e47ed0b61..53dc696e689 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -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
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 72391d4c456..cca9f074868 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -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

Hi Anatolij,
On Wed, 24 Nov 2021 at 09:27, Simon Glass sjg@chromium.org wrote:
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.
Signed-off-by: Simon Glass sjg@chromium.org
(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

This converts the following to Kconfig: CONFIG_KEYBOARD
Signed-off-by: Simon Glass sjg@chromium.org ---
(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(-)
diff --git a/README b/README index 7b03cf28c99..91eeaca96d2 100644 --- a/README +++ b/README @@ -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 diff --git a/arch/Kconfig b/arch/Kconfig index 1e0e6118139..b4cb19183e7 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -195,6 +195,7 @@ config SANDBOX imply DM_DSA imply CMD_EXTENSION imply PHYSMEM + imply KEYBOARD
config SH bool "SuperH architecture" diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 7f3aee57129..10301c10888 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -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 diff --git a/configs/chromebit_mickey_defconfig b/configs/chromebit_mickey_defconfig index 80ed1f0a145..62b54d95b14 100644 --- a/configs/chromebit_mickey_defconfig +++ b/configs/chromebit_mickey_defconfig @@ -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 diff --git a/configs/chromebook_jerry_defconfig b/configs/chromebook_jerry_defconfig index 85f612093df..a9f81e3c09a 100644 --- a/configs/chromebook_jerry_defconfig +++ b/configs/chromebook_jerry_defconfig @@ -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 diff --git a/configs/chromebook_minnie_defconfig b/configs/chromebook_minnie_defconfig index 41a3fe1a3c5..1e87b118744 100644 --- a/configs/chromebook_minnie_defconfig +++ b/configs/chromebook_minnie_defconfig @@ -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 diff --git a/configs/chromebook_speedy_defconfig b/configs/chromebook_speedy_defconfig index b396d9f7055..f1ccdc4572c 100644 --- a/configs/chromebook_speedy_defconfig +++ b/configs/chromebook_speedy_defconfig @@ -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 diff --git a/configs/novena_defconfig b/configs/novena_defconfig index 06864db00d5..e40e80e203c 100644 --- a/configs/novena_defconfig +++ b/configs/novena_defconfig @@ -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 diff --git a/configs/smdk5250_defconfig b/configs/smdk5250_defconfig index 9429114932c..f8350bfffc4 100644 --- a/configs/smdk5250_defconfig +++ b/configs/smdk5250_defconfig @@ -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 diff --git a/configs/smdk5420_defconfig b/configs/smdk5420_defconfig index e62f432e43a..a9924a46c3f 100644 --- a/configs/smdk5420_defconfig +++ b/configs/smdk5420_defconfig @@ -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 diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig index a17e55e9972..0b753f37bf4 100644 --- a/drivers/input/Kconfig +++ b/drivers/input/Kconfig @@ -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 diff --git a/include/configs/exynos5-dt-common.h b/include/configs/exynos5-dt-common.h index cc9ffda669e..00b67787d9e 100644 --- a/include/configs/exynos5-dt-common.h +++ b/include/configs/exynos5-dt-common.h @@ -30,7 +30,4 @@ #define LCD_BPP LCD_COLOR16 #endif
-/* Enable keyboard */ -#define CONFIG_KEYBOARD - #endif diff --git a/include/configs/novena.h b/include/configs/novena.h index 28fb1b8d753..f09b868d438 100644 --- a/include/configs/novena.h +++ b/include/configs/novena.h @@ -9,7 +9,6 @@ #define __CONFIG_H
/* System configurations */ -#define CONFIG_KEYBOARD
#include "mx6_common.h"
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index 53dc696e689..2307657f5bd 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -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 diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h index 3af13673f2a..d7e86f2f764 100644 --- a/include/configs/smdk5250.h +++ b/include/configs/smdk5250.h @@ -14,7 +14,6 @@
#undef CONFIG_EXYNOS_FB #undef CONFIG_EXYNOS_DP -#undef CONFIG_KEYBOARD
#define CONFIG_BOARD_COMMON
diff --git a/include/configs/smdk5420.h b/include/configs/smdk5420.h index d06dfe43a23..38691b63daf 100644 --- a/include/configs/smdk5420.h +++ b/include/configs/smdk5420.h @@ -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 */ diff --git a/include/configs/veyron.h b/include/configs/veyron.h index 2ab6d6c6aac..ce9441d71f0 100644 --- a/include/configs/veyron.h +++ b/include/configs/veyron.h @@ -13,6 +13,4 @@
#include <configs/rk3288_common.h>
-#define CONFIG_KEYBOARD - #endif diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index cca9f074868..74d52c871fc 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -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

This converts the following to Kconfig: CONFIG_KEYBOARD
Signed-off-by: Simon Glass sjg@chromium.org ---
(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!

A few boards still use the old keyboard mechanism. Set a deadline for them to update to driver model.
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
Makefile | 1 + doc/develop/driver-model/migration.rst | 8 ++++++++ 2 files changed, 9 insertions(+)
diff --git a/Makefile b/Makefile index 338ae3341e6..a9fa443bc22 100644 --- a/Makefile +++ b/Makefile @@ -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. diff --git a/doc/develop/driver-model/migration.rst b/doc/develop/driver-model/migration.rst index 8bb8601c582..3dbeea6537c 100644 --- a/doc/develop/driver-model/migration.rst +++ b/doc/develop/driver-model/migration.rst @@ -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.

A few boards still use the old keyboard mechanism. Set a deadline for them to update to driver model.
Signed-off-by: Simon Glass sjg@chromium.org ---
(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!

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
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
configs/tools-only_defconfig | 7 +++---- include/configs/sandbox.h | 4 ---- 2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig index f482c9a1c1b..ec5d1346cec 100644 --- a/configs/tools-only_defconfig +++ b/configs/tools-only_defconfig @@ -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 diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index 2307657f5bd..cd7d99ec69c 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -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 */

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
Signed-off-by: Simon Glass sjg@chromium.org ---
(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!

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.
Signed-off-by: Simon Glass sjg@chromium.org ---
(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(-)
diff --git a/README b/README index 91eeaca96d2..715d693f1d6 100644 --- a/README +++ b/README @@ -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) diff --git a/arch/arm/mach-kirkwood/include/mach/config.h b/arch/arm/mach-kirkwood/include/mach/config.h index cf6b1b9b634..9fd90611bd9 100644 --- a/arch/arm/mach-kirkwood/include/mach/config.h +++ b/arch/arm/mach-kirkwood/include/mach/config.h @@ -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) diff --git a/arch/powerpc/include/asm/config.h b/arch/powerpc/include/asm/config.h index a97b72de1b8..354137124d8 100644 --- a/arch/powerpc/include/asm/config.h +++ b/arch/powerpc/include/asm/config.h @@ -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 diff --git a/drivers/block/ide.c b/drivers/block/ide.c index c99076c6f45..5b9fb821e06 100644 --- a/drivers/block/ide.c +++ b/drivers/block/ide.c @@ -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; }
diff --git a/include/configs/edminiv2.h b/include/configs/edminiv2.h index 664d6d1f340..6b487b310cc 100644 --- a/include/configs/edminiv2.h +++ b/include/configs/edminiv2.h @@ -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) diff --git a/include/configs/r2dplus.h b/include/configs/r2dplus.h index 58ca6c28b53..1dd83dbf64d 100644 --- a/include/configs/r2dplus.h +++ b/include/configs/r2dplus.h @@ -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 diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 74d52c871fc..e34643ba527 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -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

This is not needed anymore. Drop it to simplify the code.
Signed-off-by: Simon Glass sjg@chromium.org Suggested-by: Heinrich Schuchardt xypron.glpk@gmx.de ---
Changes in v2: - Add new patch to drop ATA_PORT_ADDR
drivers/block/ide.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/block/ide.c b/drivers/block/ide.c index 5b9fb821e06..085aa356fee 100644 --- a/drivers/block/ide.c +++ b/drivers/block/ide.c @@ -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; }

This is not needed anymore. Drop it to simplify the code.
Signed-off-by: Simon Glass sjg@chromium.org Suggested-by: Heinrich Schuchardt xypron.glpk@gmx.de ---
Changes in v2: - Add new patch to drop ATA_PORT_ADDR
drivers/block/ide.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
Applied to u-boot-dm/next, thanks!

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.
Signed-off-by: Simon Glass sjg@chromium.org ---
(no changes since v1)
Makefile | 4 ++++ doc/develop/driver-model/migration.rst | 8 ++++++++ 2 files changed, 12 insertions(+)
diff --git a/Makefile b/Makefile index a9fa443bc22..22eb11e27f3 100644 --- a/Makefile +++ b/Makefile @@ -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. diff --git a/doc/develop/driver-model/migration.rst b/doc/develop/driver-model/migration.rst index 3dbeea6537c..609818a35a8 100644 --- a/doc/develop/driver-model/migration.rst +++ b/doc/develop/driver-model/migration.rst @@ -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.

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.
Signed-off-by: Simon Glass sjg@chromium.org ---
(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!
participants (2)
-
Andy Shevchenko
-
Simon Glass