bsps/beatnik: Use standard C99 designated initializers

This commit is contained in:
Jeremy Lorelli
2025-06-29 16:52:21 -07:00
committed by Joel Sherrill
parent 4b05acde6f
commit 9cfe726b0d
6 changed files with 61 additions and 61 deletions

View File

@@ -87,9 +87,9 @@ static struct bankdesc mvme6100Flash[] = {
};
struct flash_bsp_ops BSP_flashBspOps = {
bankcheck : bankcheck,
flash_wp : flash_wp,
read_us_timer: read_us_timer,
.bankcheck = bankcheck,
.flash_wp = flash_wp,
.read_us_timer = read_us_timer,
};
/* set (enbl:1), clear (enbl:0) or query (enbl:-1) write protection

View File

@@ -50,12 +50,12 @@ static rtems_irq_connect_data rtemsIrq[BSP_IRQ_NUMBER];
static rtems_irq_global_settings initial_config;
static rtems_irq_prio rtemsPrioTbl[BSP_IRQ_NUMBER];
static rtems_irq_connect_data defaultIrq = {
name: 0,
hdl: nop_func,
handle: 0,
on: 0,
off: 0,
isOn: 0
.name = 0,
.hdl = nop_func,
.handle = 0,
.on = 0,
.off = 0,
.isOn = 0
};

View File

@@ -88,24 +88,24 @@ STATIC int
gt_i2c_write_bytes(rtems_libi2c_bus_t *bh, unsigned char *buf, int len);
static rtems_libi2c_bus_ops_t myops = {
init: gt_i2c_init,
send_start: gt_i2c_send_start,
send_stop: gt_i2c_send_stop,
send_addr: gt_i2c_send_addr,
read_bytes: gt_i2c_read_bytes,
write_bytes: gt_i2c_write_bytes,
.init = gt_i2c_init,
.send_start = gt_i2c_send_start,
.send_stop = gt_i2c_send_stop,
.send_addr = gt_i2c_send_addr,
.read_bytes = gt_i2c_read_bytes,
.write_bytes = gt_i2c_write_bytes,
};
static gti2c_desc_rec my_bus_tbl = {
{
ops: &myops,
size: sizeof(my_bus_tbl),
.ops = &myops,
.size = sizeof(my_bus_tbl),
},/* public fields */
{
sc_gt: BSP_MV64x60_BASE,
sc_cntl: I2C_Control_TWSIEn,
sc_inited: 0,
sc_sync: 0
.sc_gt = BSP_MV64x60_BASE,
.sc_cntl = I2C_Control_TWSIEn,
.sc_inited = 0,
.sc_sync = 0
} /* our private fields */
};
@@ -258,11 +258,11 @@ unsigned m,n,N;
if ( _System_state_Is_up(_System_state_Get()) ) {
rtems_irq_connect_data ii = {
name: BSP_IRQ_I2C,
hdl: gt_i2c_intr,
on: 0,
off: 0,
isOn: 0
.name = BSP_IRQ_I2C,
.hdl = gt_i2c_intr,
.on = 0,
.off = 0,
.isOn = 0
};
rtems_status_code err;
/* synchronization semaphore */

View File

@@ -56,12 +56,12 @@ typedef struct {
static PciHoseCfg hoses[2] = {
{
pci_config_addr: (volatile unsigned char *)(MV64x60_PCI0_CONFIG_ADDR),
pci_config_data: (volatile unsigned char *)(MV64x60_PCI0_CONFIG_DATA),
.pci_config_addr = (volatile unsigned char *)(MV64x60_PCI0_CONFIG_ADDR),
.pci_config_data = (volatile unsigned char *)(MV64x60_PCI0_CONFIG_DATA),
},
{
pci_config_addr: (volatile unsigned char *)(MV64x60_PCI1_CONFIG_ADDR),
pci_config_data: (volatile unsigned char *)(MV64x60_PCI1_CONFIG_DATA),
.pci_config_addr = (volatile unsigned char *)(MV64x60_PCI1_CONFIG_ADDR),
.pci_config_data = (volatile unsigned char *)(MV64x60_PCI1_CONFIG_DATA),
}
};

View File

@@ -174,12 +174,12 @@ static void bsp_early( void )
Triv121PgTbl pt=0;
VpdBufRec vpdData [] = {
{ key: ProductIdent, instance: 0, buf: BSP_productIdent, buflen: sizeof(BSP_productIdent) - 1 },
{ key: SerialNumber, instance: 0, buf: BSP_serialNumber, buflen: sizeof(BSP_serialNumber) - 1 },
{ key: CpuClockHz, instance: 0, buf: &BSP_processor_frequency, buflen: sizeof(BSP_processor_frequency) },
{ key: BusClockHz, instance: 0, buf: &BSP_bus_frequency, buflen: sizeof(BSP_bus_frequency) },
{ key: EthernetAddr, instance: 0, buf: BSP_enetAddr0, buflen: sizeof(BSP_enetAddr0) },
{ key: EthernetAddr, instance: 1, buf: BSP_enetAddr1, buflen: sizeof(BSP_enetAddr1) },
{ .key = ProductIdent, .instance = 0, .buf = BSP_productIdent, .buflen = sizeof(BSP_productIdent) - 1 },
{ .key = SerialNumber, .instance = 0, .buf = BSP_serialNumber, .buflen = sizeof(BSP_serialNumber) - 1 },
{ .key = CpuClockHz, .instance = 0, .buf = &BSP_processor_frequency, .buflen = sizeof(BSP_processor_frequency) },
{ .key = BusClockHz, .instance = 0, .buf = &BSP_bus_frequency, .buflen = sizeof(BSP_bus_frequency) },
{ .key = EthernetAddr, .instance = 0, .buf = BSP_enetAddr0, .buflen = sizeof(BSP_enetAddr0) },
{ .key = EthernetAddr, .instance = 1, .buf = BSP_enetAddr1, .buflen = sizeof(BSP_enetAddr1) },
VPD_END
};
@@ -315,7 +315,7 @@ static void bsp_early( void )
#ifdef SHOW_MORE_INIT_SETTINGS
printk(
"Configuration.work_space_size = %x\n",
"Configuration.work_space_size = %lx\n",
rtems_configuration_get_work_space_size()
);
#endif

View File

@@ -85,33 +85,33 @@ typedef struct {
} VMEOpsRec, *VMEOps;
static VMEOpsRec uniOpsRec = {
xlate_adrs: vmeUniverseXlateAddr,
install_isr: vmeUniverseInstallISR,
remove_isr: vmeUniverseRemoveISR,
get_isr: vmeUniverseISRGet,
enable_int_lvl: vmeUniverseIntEnable,
disable_int_lvl: vmeUniverseIntDisable,
outbound_p_cfg: vmeUniverseMasterPortCfg,
inbound_p_cfg: vmeUniverseSlavePortCfg,
outbound_p_show: vmeUniverseMasterPortsShow,
inbound_p_show: vmeUniverseSlavePortsShow,
reset_bus: vmeUniverseResetBus,
install_irq_mgr: vmeUniverseInstallIrqMgrAlt,
.xlate_adrs = vmeUniverseXlateAddr,
.install_isr = vmeUniverseInstallISR,
.remove_isr = vmeUniverseRemoveISR,
.get_isr = vmeUniverseISRGet,
.enable_int_lvl = vmeUniverseIntEnable,
.disable_int_lvl = vmeUniverseIntDisable,
.outbound_p_cfg = vmeUniverseMasterPortCfg,
.inbound_p_cfg = vmeUniverseSlavePortCfg,
.outbound_p_show = vmeUniverseMasterPortsShow,
.inbound_p_show = vmeUniverseSlavePortsShow,
.reset_bus = vmeUniverseResetBus,
.install_irq_mgr = vmeUniverseInstallIrqMgrAlt,
};
static VMEOpsRec tsiOpsRec = {
xlate_adrs: vmeTsi148XlateAddr,
install_isr: vmeTsi148InstallISR,
remove_isr: vmeTsi148RemoveISR,
get_isr: vmeTsi148ISRGet,
enable_int_lvl: vmeTsi148IntEnable,
disable_int_lvl: vmeTsi148IntDisable,
outbound_p_cfg: vmeTsi148OutboundPortCfg,
inbound_p_cfg: vmeTsi148InboundPortCfg,
outbound_p_show: vmeTsi148OutboundPortsShow,
inbound_p_show: vmeTsi148InboundPortsShow,
reset_bus: vmeTsi148ResetBus,
install_irq_mgr: vmeTsi148InstallIrqMgrAlt,
.xlate_adrs = vmeTsi148XlateAddr,
.install_isr = vmeTsi148InstallISR,
.remove_isr = vmeTsi148RemoveISR,
.get_isr = vmeTsi148ISRGet,
.enable_int_lvl = vmeTsi148IntEnable,
.disable_int_lvl = vmeTsi148IntDisable,
.outbound_p_cfg = vmeTsi148OutboundPortCfg,
.inbound_p_cfg = vmeTsi148InboundPortCfg,
.outbound_p_show = vmeTsi148OutboundPortsShow,
.inbound_p_show = vmeTsi148InboundPortsShow,
.reset_bus = vmeTsi148ResetBus,
.install_irq_mgr = vmeTsi148InstallIrqMgrAlt,
};
static VMEOps theOps = 0;