diff options
| author | Tom Rini <[email protected]> | 2022-03-25 08:02:04 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2022-03-25 08:02:31 -0400 |
| commit | 3b2d19c838a48350e06d4c12e4d749eec0217f2c (patch) | |
| tree | 2365bd9cda80b0bcbd56d181683186534287553c /common | |
| parent | a958c58571ef2af420f482f47a34924d75510065 (diff) | |
| parent | b40d2b2891382398c1be1df6ee1b6390f247a030 (diff) | |
Merge branch '2022-03-25-Kconfig-migrations' into next
- Merge a number of Kconfig migration patches
Diffstat (limited to 'common')
| -rw-r--r-- | common/Kconfig | 6 | ||||
| -rw-r--r-- | common/lcd.c | 52 | ||||
| -rw-r--r-- | common/miiphyutil.c | 2 |
3 files changed, 7 insertions, 53 deletions
diff --git a/common/Kconfig b/common/Kconfig index 24c83f04e23..383eb4d5627 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -611,6 +611,12 @@ config PCI_INIT_R case of DM PCI-based Ethernet devices, which will not be detected without having the enumeration performed earlier. +config RESET_PHY_R + bool "Reset ethernet PHY during init" + help + Implement reset_phy() in board code if required to reset the ethernet + PHY. + endmenu endmenu # Init options diff --git a/common/lcd.c b/common/lcd.c index 16a0a7cea8f..bd2f020d5da 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -90,54 +90,6 @@ static void lcd_stub_puts(struct stdio_dev *dev, const char *s) lcd_puts(s); } -/* Small utility to check that you got the colours right */ -#ifdef LCD_TEST_PATTERN - -#if LCD_BPP == LCD_COLOR8 -#define N_BLK_VERT 2 -#define N_BLK_HOR 3 - -static int test_colors[N_BLK_HOR * N_BLK_VERT] = { - CONSOLE_COLOR_RED, CONSOLE_COLOR_GREEN, CONSOLE_COLOR_YELLOW, - CONSOLE_COLOR_BLUE, CONSOLE_COLOR_MAGENTA, CONSOLE_COLOR_CYAN, -}; /*LCD_BPP == LCD_COLOR8 */ - -#elif LCD_BPP == LCD_COLOR16 -#define N_BLK_VERT 2 -#define N_BLK_HOR 4 - -static int test_colors[N_BLK_HOR * N_BLK_VERT] = { - CONSOLE_COLOR_RED, CONSOLE_COLOR_GREEN, CONSOLE_COLOR_YELLOW, CONSOLE_COLOR_BLUE, - CONSOLE_COLOR_MAGENTA, CONSOLE_COLOR_CYAN, CONSOLE_COLOR_GREY, CONSOLE_COLOR_WHITE, -}; -#endif /*LCD_BPP == LCD_COLOR16 */ - -static void test_pattern(void) -{ - ushort v_max = panel_info.vl_row; - ushort h_max = panel_info.vl_col; - ushort v_step = (v_max + N_BLK_VERT - 1) / N_BLK_VERT; - ushort h_step = (h_max + N_BLK_HOR - 1) / N_BLK_HOR; - ushort v, h; -#if LCD_BPP == LCD_COLOR8 - uchar *pix = (uchar *)lcd_base; -#elif LCD_BPP == LCD_COLOR16 - ushort *pix = (ushort *)lcd_base; -#endif - - printf("[LCD] Test Pattern: %d x %d [%d x %d]\n", - h_max, v_max, h_step, v_step); - - for (v = 0; v < v_max; ++v) { - uchar iy = v / v_step; - for (h = 0; h < h_max; ++h) { - uchar ix = N_BLK_HOR * iy + h / h_step; - *pix++ = test_colors[ix]; - } - } -} -#endif /* LCD_TEST_PATTERN */ - /* * With most lcd drivers the line length is set up * by calculating it from panel_info parameters. Some @@ -201,9 +153,6 @@ void lcd_clear(void) bg_color = CONSOLE_COLOR_BLACK; #endif /* CONFIG_SYS_WHITE_ON_BLACK */ -#ifdef LCD_TEST_PATTERN - test_pattern(); -#else /* set framebuffer to background color */ #if (LCD_BPP != LCD_COLOR32) memset((char *)lcd_base, bg_color, lcd_line_length * panel_info.vl_row); @@ -216,7 +165,6 @@ void lcd_clear(void) *ppix++ = bg_color; } #endif -#endif /* setup text-console */ debug("[LCD] setting up console...\n"); lcd_init_console(lcd_base, diff --git a/common/miiphyutil.c b/common/miiphyutil.c index 7d4d15ed918..194c84e7e89 100644 --- a/common/miiphyutil.c +++ b/common/miiphyutil.c @@ -366,7 +366,7 @@ int miiphy_reset(const char *devname, unsigned char addr) debug("PHY reset failed\n"); return -1; } -#ifdef CONFIG_PHY_RESET_DELAY +#if CONFIG_PHY_RESET_DELAY > 0 udelay(CONFIG_PHY_RESET_DELAY); /* Intel LXT971A needs this */ #endif /* |
