mb/starlabs/*: Use inline DEV_PTR calls
Remove the intermediate struct device's, and replace with the DEV_PTR macro. This isn't a functional change, just cleaner. Change-Id: I1a6a596a4d4215f6b670a8a7f7749a4f9bd391b0 Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-on: https://review.coreboot.org/c/coreboot/+/90820 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
This commit is contained in:
parent
9f8094575e
commit
a198e7b8d6
10 changed files with 23 additions and 56 deletions
|
|
@ -22,9 +22,6 @@ void devtree_update(void)
|
|||
struct soc_power_limits_config *soc_conf_8core =
|
||||
&cfg->power_limits_config[ADL_N_041_15W_CORE];
|
||||
|
||||
struct device *wifi_dev = pcidev_on_root(0x14, 3);
|
||||
struct device *gna_dev = pcidev_on_root(0x08, 0);
|
||||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
|
|
@ -59,7 +56,7 @@ void devtree_update(void)
|
|||
|
||||
/* Enable/Disable WiFi based on CMOS settings */
|
||||
if (get_uint_option("wifi", 1) == 0)
|
||||
wifi_dev->enabled = 0;
|
||||
DEV_PTR(cnvi_wifi)->enabled = 0;
|
||||
|
||||
/* Enable/Disable Bluetooth based on CMOS settings */
|
||||
if (get_uint_option("bluetooth", 1) == 0)
|
||||
|
|
@ -67,5 +64,5 @@ void devtree_update(void)
|
|||
|
||||
/* Enable/Disable GNA based on CMOS settings */
|
||||
if (get_uint_option("gna", 0) == 0)
|
||||
gna_dev->enabled = 0;
|
||||
DEV_PTR(gna)->enabled = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@ void devtree_update(void)
|
|||
struct soc_power_limits_config *soc_conf_12core =
|
||||
&cfg->power_limits_config[ADL_P_682_28W_CORE];
|
||||
|
||||
struct device *gna_dev = pcidev_on_root(0x08, 0);
|
||||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
|
|
@ -75,5 +73,5 @@ void devtree_update(void)
|
|||
|
||||
/* Enable/Disable GNA based on CMOS settings */
|
||||
if (get_uint_option("gna", 0) == 0)
|
||||
gna_dev->enabled = 0;
|
||||
DEV_PTR(gna)->enabled = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@ void devtree_update(void)
|
|||
struct soc_power_limits_config *soc_conf_4core =
|
||||
&cfg->power_limits_config[ADL_N_041_6W_CORE];
|
||||
|
||||
struct device *gna_dev = pcidev_on_root(0x08, 0);
|
||||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
|
|
@ -63,5 +61,5 @@ void devtree_update(void)
|
|||
|
||||
/* Enable/Disable GNA based on CMOS settings */
|
||||
if (get_uint_option("gna", 0) == 0)
|
||||
gna_dev->enabled = 0;
|
||||
DEV_PTR(gna)->enabled = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@ void devtree_update(void)
|
|||
|
||||
struct soc_power_limits_config *soc_conf = &cfg->power_limits_config;
|
||||
|
||||
struct device *wifi_dev = pcidev_on_root(0x14, 3);
|
||||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
|
|
@ -50,7 +48,7 @@ void devtree_update(void)
|
|||
|
||||
/* Enable/Disable WiFi based on CMOS settings */
|
||||
if (get_uint_option("wifi", 1) == 0)
|
||||
wifi_dev->enabled = 0;
|
||||
DEV_PTR(cnvi_wifi)->enabled = 0;
|
||||
|
||||
/* Enable/Disable Bluetooth based on CMOS settings */
|
||||
if (get_uint_option("bluetooth", 1) == 0)
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@ void devtree_update(void)
|
|||
|
||||
struct soc_power_limits_config *soc_conf = &cfg->power_limits_config;
|
||||
|
||||
struct device *wifi_dev = pcidev_on_root(0x1c, 5);
|
||||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
|
|
@ -50,7 +48,7 @@ void devtree_update(void)
|
|||
|
||||
/* Enable/Disable WiFi based on CMOS settings */
|
||||
if (get_uint_option("wifi", 1) == 0)
|
||||
wifi_dev->enabled = 0;
|
||||
DEV_PTR(pcie_rp5)->enabled = 0;
|
||||
|
||||
/* Enable/Disable Bluetooth based on CMOS settings */
|
||||
if (get_uint_option("bluetooth", 1) == 0)
|
||||
|
|
|
|||
|
|
@ -20,9 +20,6 @@ void devtree_update(void)
|
|||
struct soc_power_limits_config *soc_conf_20core =
|
||||
&cfg->power_limits_config[MTL_P_682_482_CORE];
|
||||
|
||||
struct device *gna_dev = pcidev_on_root(0x08, 0);
|
||||
struct device *vpu_dev = pcidev_on_root(0x0b, 0);
|
||||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
|
|
@ -64,9 +61,9 @@ void devtree_update(void)
|
|||
|
||||
/* Enable/Disable GNA based on CMOS settings */
|
||||
if (get_uint_option("gna", 0) == 0)
|
||||
gna_dev->enabled = 0;
|
||||
DEV_PTR(gna)->enabled = 0;
|
||||
|
||||
/* Enable/Disable VPU based on CMOS settings */
|
||||
if (get_uint_option("vpu", 0) == 0)
|
||||
vpu_dev->enabled = 0;
|
||||
DEV_PTR(vpu)->enabled = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,10 +23,6 @@ void devtree_update(void)
|
|||
struct soc_power_limits_config *soc_conf_12core =
|
||||
&cfg->power_limits_config[RPL_P_682_482_282_28W_CORE];
|
||||
|
||||
struct device *tbt_pci_dev = pcidev_on_root(0x07, 0);
|
||||
struct device *tbt_dma_dev = pcidev_on_root(0x0d, 2);
|
||||
struct device *gna_dev = pcidev_on_root(0x08, 0);
|
||||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
|
|
@ -77,11 +73,11 @@ void devtree_update(void)
|
|||
|
||||
/* Enable/Disable Thunderbolt based on CMOS settings */
|
||||
if (get_uint_option("thunderbolt", 1) == 0) {
|
||||
tbt_pci_dev->enabled = 0;
|
||||
tbt_dma_dev->enabled = 0;
|
||||
DEV_PTR(tbt_pcie_rp0)->enabled = 0;
|
||||
DEV_PTR(tcss_dma0)->enabled = 0;
|
||||
}
|
||||
|
||||
/* Enable/Disable GNA based on CMOS settings */
|
||||
if (get_uint_option("gna", 0) == 0)
|
||||
gna_dev->enabled = 0;
|
||||
DEV_PTR(gna)->enabled = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,11 +23,6 @@ void devtree_update(void)
|
|||
struct soc_power_limits_config *soc_conf_4core =
|
||||
&cfg->power_limits_config[POWER_LIMITS_U_4_CORE];
|
||||
|
||||
struct device *wifi_dev = pcidev_on_root(0x14, 3);
|
||||
struct device *tbt_pci_dev = pcidev_on_root(0x07, 0);
|
||||
struct device *tbt_dma_dev = pcidev_on_root(0x0d, 2);
|
||||
struct device *gna_dev = pcidev_on_root(0x08, 0);
|
||||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
|
|
@ -62,7 +57,7 @@ void devtree_update(void)
|
|||
|
||||
/* Enable/Disable WiFi based on CMOS settings */
|
||||
if (get_uint_option("wifi", 1) == 0)
|
||||
wifi_dev->enabled = 0;
|
||||
DEV_PTR(cnvi_wifi)->enabled = 0;
|
||||
|
||||
/* Enable/Disable Bluetooth based on CMOS settings */
|
||||
if (get_uint_option("bluetooth", 1) == 0)
|
||||
|
|
@ -79,11 +74,11 @@ void devtree_update(void)
|
|||
if (get_uint_option("thunderbolt", 1) == 0) {
|
||||
cfg->UsbTcPortEn = 0;
|
||||
cfg->TcssXhciEn = 0;
|
||||
tbt_pci_dev->enabled = 0;
|
||||
tbt_dma_dev->enabled = 0;
|
||||
DEV_PTR(tbt_pcie_rp0)->enabled = 0;
|
||||
DEV_PTR(tbt_dma0)->enabled = 0;
|
||||
}
|
||||
|
||||
/* Enable/Disable GNA based on CMOS settings */
|
||||
if (get_uint_option("gna", 0) == 0)
|
||||
gna_dev->enabled = 0;
|
||||
DEV_PTR(gna)->enabled = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,11 +23,6 @@ void devtree_update(void)
|
|||
struct soc_power_limits_config *soc_conf_14core =
|
||||
&cfg->power_limits_config[RPL_P_682_642_482_45W_CORE];
|
||||
|
||||
struct device *tbt_pci_dev_0 = pcidev_on_root(0x07, 0);
|
||||
struct device *tbt_pci_dev_1 = pcidev_on_root(0x07, 1);
|
||||
struct device *tbt_dma_dev = pcidev_on_root(0x0d, 2);
|
||||
struct device *gna_dev = pcidev_on_root(0x08, 0);
|
||||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
|
|
@ -70,12 +65,12 @@ void devtree_update(void)
|
|||
|
||||
/* Enable/Disable Thunderbolt based on CMOS settings */
|
||||
if (get_uint_option("thunderbolt", 1) == 0) {
|
||||
tbt_pci_dev_0->enabled = 0;
|
||||
tbt_pci_dev_1->enabled = 0;
|
||||
tbt_dma_dev->enabled = 0;
|
||||
DEV_PTR(tbt_pcie_rp0)->enabled = 0;
|
||||
DEV_PTR(tbt_pcie_rp1)->enabled = 0;
|
||||
DEV_PTR(tcss_dma0)->enabled = 0;
|
||||
}
|
||||
|
||||
/* Enable/Disable GNA based on CMOS settings */
|
||||
if (get_uint_option("gna", 0) == 0)
|
||||
gna_dev->enabled = 0;
|
||||
DEV_PTR(gna)->enabled = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,11 +20,6 @@ void devtree_update(void)
|
|||
struct soc_power_limits_config *soc_conf_4core =
|
||||
&cfg->power_limits_config[ADL_N_041_6W_CORE];
|
||||
|
||||
struct device *wifi_dev = pcidev_on_root(0x14, 3);
|
||||
struct device *touchscreen_dev = pcidev_on_root(0x15, 2);
|
||||
struct device *accelerometer_dev = pcidev_on_root(0x15, 0);
|
||||
struct device *gna_dev = pcidev_on_root(0x08, 0);
|
||||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
|
|
@ -55,7 +50,7 @@ void devtree_update(void)
|
|||
|
||||
/* Enable/Disable WiFi based on CMOS settings */
|
||||
if (get_uint_option("wifi", 1) == 0)
|
||||
wifi_dev->enabled = 0;
|
||||
DEV_PTR(cnvi_wifi)->enabled = 0;
|
||||
|
||||
/* Enable/Disable Bluetooth based on CMOS settings */
|
||||
if (get_uint_option("bluetooth", 1) == 0)
|
||||
|
|
@ -67,15 +62,15 @@ void devtree_update(void)
|
|||
|
||||
/* Enable/Disable Touchscreen based on CMOS settings */
|
||||
if (get_uint_option("touchscreen", 1) == 0)
|
||||
touchscreen_dev->enabled = 0;
|
||||
DEV_PTR(i2c2)->enabled = 0;
|
||||
|
||||
/* Enable/Disable Accelerometer based on CMOS settings */
|
||||
if (get_uint_option("accelerometer", 1) == 0)
|
||||
accelerometer_dev->enabled = 0;
|
||||
DEV_PTR(i2c0)->enabled = 0;
|
||||
|
||||
/* Enable/Disable GNA based on CMOS settings */
|
||||
if (get_uint_option("gna", 0) == 0)
|
||||
gna_dev->enabled = 0;
|
||||
DEV_PTR(gna)->enabled = 0;
|
||||
|
||||
/* Enable/Disable Card Reader based on CMOS Settings */
|
||||
if (get_uint_option("card_reader", 0) == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue