1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright 2008 Extreme Engineering Solutions, Inc.
12 * Determine if a board's flashes are write protected
14 int board_flash_wp_on(void)
16 if (pca953x_get_val(CONFIG_SYS_I2C_PCA953X_ADDR0) &
17 CONFIG_SYS_PCA953X_NVM_WP)
25 * Return a board's derivative model number. For example:
26 * return 2 for the XPedite5372 and return 1 for the XPedite5201.
28 uint get_board_derivative(void)
30 #if defined(CONFIG_MPC85xx)
31 volatile ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
32 #elif defined(CONFIG_MPC86xx)
33 volatile immap_t *immap = (immap_t *)CONFIG_SYS_CCSRBAR;
34 volatile ccsr_gur_t *gur = &immap->im_gur;
38 * The top 4 lines of the local bus address are pulled low/high and
39 * can be read to determine the least significant digit of a board's
42 return gur->gpporcr >> 28;