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 = { struct flash_bsp_ops BSP_flashBspOps = {
bankcheck : bankcheck, .bankcheck = bankcheck,
flash_wp : flash_wp, .flash_wp = flash_wp,
read_us_timer: read_us_timer, .read_us_timer = read_us_timer,
}; };
/* set (enbl:1), clear (enbl:0) or query (enbl:-1) write protection /* 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_global_settings initial_config;
static rtems_irq_prio rtemsPrioTbl[BSP_IRQ_NUMBER]; static rtems_irq_prio rtemsPrioTbl[BSP_IRQ_NUMBER];
static rtems_irq_connect_data defaultIrq = { static rtems_irq_connect_data defaultIrq = {
name: 0, .name = 0,
hdl: nop_func, .hdl = nop_func,
handle: 0, .handle = 0,
on: 0, .on = 0,
off: 0, .off = 0,
isOn: 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); gt_i2c_write_bytes(rtems_libi2c_bus_t *bh, unsigned char *buf, int len);
static rtems_libi2c_bus_ops_t myops = { static rtems_libi2c_bus_ops_t myops = {
init: gt_i2c_init, .init = gt_i2c_init,
send_start: gt_i2c_send_start, .send_start = gt_i2c_send_start,
send_stop: gt_i2c_send_stop, .send_stop = gt_i2c_send_stop,
send_addr: gt_i2c_send_addr, .send_addr = gt_i2c_send_addr,
read_bytes: gt_i2c_read_bytes, .read_bytes = gt_i2c_read_bytes,
write_bytes: gt_i2c_write_bytes, .write_bytes = gt_i2c_write_bytes,
}; };
static gti2c_desc_rec my_bus_tbl = { static gti2c_desc_rec my_bus_tbl = {
{ {
ops: &myops, .ops = &myops,
size: sizeof(my_bus_tbl), .size = sizeof(my_bus_tbl),
},/* public fields */ },/* public fields */
{ {
sc_gt: BSP_MV64x60_BASE, .sc_gt = BSP_MV64x60_BASE,
sc_cntl: I2C_Control_TWSIEn, .sc_cntl = I2C_Control_TWSIEn,
sc_inited: 0, .sc_inited = 0,
sc_sync: 0 .sc_sync = 0
} /* our private fields */ } /* our private fields */
}; };
@@ -258,11 +258,11 @@ unsigned m,n,N;
if ( _System_state_Is_up(_System_state_Get()) ) { if ( _System_state_Is_up(_System_state_Get()) ) {
rtems_irq_connect_data ii = { rtems_irq_connect_data ii = {
name: BSP_IRQ_I2C, .name = BSP_IRQ_I2C,
hdl: gt_i2c_intr, .hdl = gt_i2c_intr,
on: 0, .on = 0,
off: 0, .off = 0,
isOn: 0 .isOn = 0
}; };
rtems_status_code err; rtems_status_code err;
/* synchronization semaphore */ /* synchronization semaphore */

View File

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

View File

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

View File

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