1.1 --- a/pkg/landfall-examples/hw_info/x1600.c Fri Nov 03 19:58:11 2023 +0100
1.2 +++ b/pkg/landfall-examples/hw_info/x1600.c Tue Nov 07 19:20:32 2023 +0100
1.3 @@ -41,14 +41,11 @@
1.4 return x1600_aic_get_channel(aic, num, channel);
1.5 }
1.6
1.7 -long aic_get_buffer(void *channel, uint32_t count, l4_addr_t *addr)
1.8 +unsigned int aic_transfer(void *channel, l4re_dma_space_dma_addr_t paddr,
1.9 + uint32_t count, uint32_t sample_rate,
1.10 + uint8_t sample_size)
1.11 {
1.12 - return x1600_aic_get_buffer(channel, count, addr);
1.13 -}
1.14 -
1.15 -unsigned int aic_transfer(void *channel, uint32_t count, uint32_t sample_rate, uint8_t sample_size)
1.16 -{
1.17 - return x1600_aic_transfer(channel, count, sample_rate, sample_size);
1.18 + return x1600_aic_transfer(channel, paddr, count, sample_rate, sample_size);
1.19 }
1.20
1.21
1.22 @@ -326,19 +323,50 @@
1.23
1.24 /* SPI adapter functions. */
1.25
1.26 -void *spi_get_channel(void *clock_chip, int clock_pin,
1.27 - void *data_chip, int data_pin,
1.28 - void *enable_chip, int enable_pin,
1.29 - uint32_t frequency)
1.30 +void *spi_init(l4_addr_t spi_start, l4_addr_t start, l4_addr_t end, void *cpm)
1.31 +{
1.32 + (void) spi_start; (void) start; (void) end; (void) cpm;
1.33 + return NULL;
1.34 +}
1.35 +
1.36 +void *spi_get_channel(void *spi, uint8_t num, void *channel, uint64_t frequency)
1.37 +{
1.38 + (void) spi; (void) num; (void) channel; (void) frequency;
1.39 + return NULL;
1.40 +}
1.41 +
1.42 +void *spi_get_channel_gpio(void *clock_chip, int clock_pin,
1.43 + void *data_chip, int data_pin,
1.44 + void *enable_chip, int enable_pin,
1.45 + uint64_t frequency)
1.46 {
1.47 return spi_gpio_get_channel(clock_chip, clock_pin, data_chip, data_pin, enable_chip, enable_pin, frequency);
1.48 }
1.49
1.50 -void spi_send(void *channel, int bytes, const uint8_t data[])
1.51 +void spi_send(void *channel, int bytes, const uint8_t data[], uint8_t unit_size,
1.52 + uint8_t char_size)
1.53 +{
1.54 + /* NOTE: Not yet supported. */
1.55 +
1.56 + (void) channel; (void) bytes; (void) data; (void) unit_size; (void) char_size;
1.57 + // x1600_spi_send(channel, bytes, data, unit_size, char_size);
1.58 +}
1.59 +
1.60 +void spi_send_gpio(void *channel, int bytes, const uint8_t data[])
1.61 {
1.62 spi_gpio_send(channel, bytes, data);
1.63 }
1.64
1.65 +uint32_t spi_transfer(void *channel, l4re_dma_space_dma_addr_t paddr,
1.66 + uint32_t count, uint8_t unit_size, uint8_t char_size)
1.67 +{
1.68 + /* NOTE: Not yet supported. */
1.69 +
1.70 + (void) channel; (void) paddr; (void) count; (void) unit_size; (void) char_size;
1.71 + // return x1600_spi_transfer(channel, paddr, count, unit_size, char_size);
1.72 + return 0;
1.73 +}
1.74 +
1.75
1.76
1.77 /* Memory regions. */
1.78 @@ -349,6 +377,7 @@
1.79 [DMA] = "x1600-dma",
1.80 [GPIO] = "x1600-gpio",
1.81 [I2C] = "x1600-i2c",
1.82 + [SSI] = "x1600-ssi",
1.83 };
1.84
1.85
1.86 @@ -377,7 +406,7 @@
1.87 {"apb", Clock_pclock, "APB"},
1.88 {"aic", Clock_aic, "AIC"},
1.89 {"dma", Clock_dma, "DMA"},
1.90 - {"lcd", Clock_lcd_pixel0, "LCD pixel"},
1.91 + {"lcd0", Clock_lcd_pixel0, "LCD pixel"},
1.92 {"msc0", Clock_msc0, "MSC0"},
1.93 {"msc1", Clock_msc1, "MSC1"},
1.94 {"otg", Clock_otg0, "USB OTG"},
1.95 @@ -387,7 +416,7 @@
1.96 {"i2s1", Clock_i2s1, "I2S1"},
1.97 {"i2s0r", Clock_i2s0_rx, "I2S0 RX"},
1.98 {"i2s0t", Clock_i2s0_tx, "I2S0 TX"},
1.99 - {"ssi", Clock_ssi0, "SSI"},
1.100 + {"ssi0", Clock_ssi0, "SSI"},
1.101 {"uart0", Clock_uart0, "UART0"},
1.102 {"uart1", Clock_uart1, "UART1"},
1.103 {"uart2", Clock_uart2, "UART2"},
1.104 @@ -403,9 +432,9 @@
1.105
1.106 const unsigned int num_dma_channels = 32;
1.107
1.108 -struct dma_region dma_regions[2];
1.109 +struct dma_region dma_regions[8];
1.110
1.111 -const unsigned int num_dma_regions = 2;
1.112 +const unsigned int num_dma_regions = 8;
1.113
1.114 l4_cap_idx_t dma_irq = L4_INVALID_CAP;
1.115