Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause |
| 2 | // |
| 3 | // AMD SPI controller driver |
| 4 | // |
| 5 | // Copyright (c) 2020, Advanced Micro Devices, Inc. |
| 6 | // |
| 7 | // Author: Sanjay R Mehta <sanju.mehta@amd.com> |
| 8 | |
| 9 | #include <linux/acpi.h> |
| 10 | #include <linux/init.h> |
| 11 | #include <linux/module.h> |
| 12 | #include <linux/platform_device.h> |
| 13 | #include <linux/delay.h> |
| 14 | #include <linux/spi/spi.h> |
| 15 | |
| 16 | #define AMD_SPI_CTRL0_REG 0x00 |
| 17 | #define AMD_SPI_EXEC_CMD BIT(16) |
| 18 | #define AMD_SPI_FIFO_CLEAR BIT(20) |
| 19 | #define AMD_SPI_BUSY BIT(31) |
| 20 | |
| 21 | #define AMD_SPI_OPCODE_MASK 0xFF |
| 22 | |
| 23 | #define AMD_SPI_ALT_CS_REG 0x1D |
| 24 | #define AMD_SPI_ALT_CS_MASK 0x3 |
| 25 | |
| 26 | #define AMD_SPI_FIFO_BASE 0x80 |
| 27 | #define AMD_SPI_TX_COUNT_REG 0x48 |
| 28 | #define AMD_SPI_RX_COUNT_REG 0x4B |
| 29 | #define AMD_SPI_STATUS_REG 0x4C |
| 30 | |
| 31 | #define AMD_SPI_MEM_SIZE 200 |
| 32 | |
| 33 | /* M_CMD OP codes for SPI */ |
| 34 | #define AMD_SPI_XFER_TX 1 |
| 35 | #define AMD_SPI_XFER_RX 2 |
| 36 | |
| 37 | struct amd_spi { |
| 38 | void __iomem *io_remap_addr; |
| 39 | unsigned long io_base_addr; |
| 40 | u32 rom_addr; |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 41 | }; |
| 42 | |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 43 | static inline u8 amd_spi_readreg8(struct amd_spi *amd_spi, int idx) |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 44 | { |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 45 | return ioread8((u8 __iomem *)amd_spi->io_remap_addr + idx); |
| 46 | } |
| 47 | |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 48 | static inline void amd_spi_writereg8(struct amd_spi *amd_spi, int idx, u8 val) |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 49 | { |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 50 | iowrite8(val, ((u8 __iomem *)amd_spi->io_remap_addr + idx)); |
| 51 | } |
| 52 | |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 53 | static void amd_spi_setclear_reg8(struct amd_spi *amd_spi, int idx, u8 set, u8 clear) |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 54 | { |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 55 | u8 tmp = amd_spi_readreg8(amd_spi, idx); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 56 | |
| 57 | tmp = (tmp & ~clear) | set; |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 58 | amd_spi_writereg8(amd_spi, idx, tmp); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 59 | } |
| 60 | |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 61 | static inline u32 amd_spi_readreg32(struct amd_spi *amd_spi, int idx) |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 62 | { |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 63 | return ioread32((u8 __iomem *)amd_spi->io_remap_addr + idx); |
| 64 | } |
| 65 | |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 66 | static inline void amd_spi_writereg32(struct amd_spi *amd_spi, int idx, u32 val) |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 67 | { |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 68 | iowrite32(val, ((u8 __iomem *)amd_spi->io_remap_addr + idx)); |
| 69 | } |
| 70 | |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 71 | static inline void amd_spi_setclear_reg32(struct amd_spi *amd_spi, int idx, u32 set, u32 clear) |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 72 | { |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 73 | u32 tmp = amd_spi_readreg32(amd_spi, idx); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 74 | |
| 75 | tmp = (tmp & ~clear) | set; |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 76 | amd_spi_writereg32(amd_spi, idx, tmp); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 77 | } |
| 78 | |
Lucas Tanure | 3b02d28 | 2021-09-10 12:15:28 +0100 | [diff] [blame] | 79 | static void amd_spi_select_chip(struct amd_spi *amd_spi, u8 cs) |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 80 | { |
Lucas Tanure | 3b02d28 | 2021-09-10 12:15:28 +0100 | [diff] [blame] | 81 | amd_spi_setclear_reg8(amd_spi, AMD_SPI_ALT_CS_REG, cs, AMD_SPI_ALT_CS_MASK); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 82 | } |
| 83 | |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 84 | static void amd_spi_clear_fifo_ptr(struct amd_spi *amd_spi) |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 85 | { |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 86 | amd_spi_setclear_reg32(amd_spi, AMD_SPI_CTRL0_REG, AMD_SPI_FIFO_CLEAR, AMD_SPI_FIFO_CLEAR); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 87 | } |
| 88 | |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 89 | static void amd_spi_set_opcode(struct amd_spi *amd_spi, u8 cmd_opcode) |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 90 | { |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 91 | amd_spi_setclear_reg32(amd_spi, AMD_SPI_CTRL0_REG, cmd_opcode, AMD_SPI_OPCODE_MASK); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 92 | } |
| 93 | |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 94 | static inline void amd_spi_set_rx_count(struct amd_spi *amd_spi, u8 rx_count) |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 95 | { |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 96 | amd_spi_setclear_reg8(amd_spi, AMD_SPI_RX_COUNT_REG, rx_count, 0xff); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 97 | } |
| 98 | |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 99 | static inline void amd_spi_set_tx_count(struct amd_spi *amd_spi, u8 tx_count) |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 100 | { |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 101 | amd_spi_setclear_reg8(amd_spi, AMD_SPI_TX_COUNT_REG, tx_count, 0xff); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 102 | } |
| 103 | |
Lucas Tanure | 356b02f | 2021-09-10 12:15:27 +0100 | [diff] [blame] | 104 | static int amd_spi_busy_wait(struct amd_spi *amd_spi) |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 105 | { |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 106 | int timeout = 100000; |
| 107 | |
| 108 | /* poll for SPI bus to become idle */ |
Lucas Tanure | 356b02f | 2021-09-10 12:15:27 +0100 | [diff] [blame] | 109 | while (amd_spi_readreg32(amd_spi, AMD_SPI_CTRL0_REG) & AMD_SPI_BUSY) { |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 110 | usleep_range(10, 20); |
| 111 | if (timeout-- < 0) |
| 112 | return -ETIMEDOUT; |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 113 | } |
| 114 | |
| 115 | return 0; |
| 116 | } |
| 117 | |
Lucas Tanure | 777a2cb | 2021-09-10 12:15:29 +0100 | [diff] [blame] | 118 | static int amd_spi_execute_opcode(struct amd_spi *amd_spi) |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 119 | { |
Lucas Tanure | 777a2cb | 2021-09-10 12:15:29 +0100 | [diff] [blame] | 120 | int ret; |
| 121 | |
| 122 | ret = amd_spi_busy_wait(amd_spi); |
| 123 | if (ret) |
| 124 | return ret; |
| 125 | |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 126 | /* Set ExecuteOpCode bit in the CTRL0 register */ |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 127 | amd_spi_setclear_reg32(amd_spi, AMD_SPI_CTRL0_REG, AMD_SPI_EXEC_CMD, AMD_SPI_EXEC_CMD); |
Lucas Tanure | 777a2cb | 2021-09-10 12:15:29 +0100 | [diff] [blame] | 128 | |
| 129 | return 0; |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 130 | } |
| 131 | |
| 132 | static int amd_spi_master_setup(struct spi_device *spi) |
| 133 | { |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 134 | struct amd_spi *amd_spi = spi_master_get_devdata(spi->master); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 135 | |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 136 | amd_spi_clear_fifo_ptr(amd_spi); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 137 | |
| 138 | return 0; |
| 139 | } |
| 140 | |
| 141 | static inline int amd_spi_fifo_xfer(struct amd_spi *amd_spi, |
Lukas Wunner | 36c72a5 | 2020-05-04 13:12:05 +0200 | [diff] [blame] | 142 | struct spi_master *master, |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 143 | struct spi_message *message) |
| 144 | { |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 145 | struct spi_transfer *xfer = NULL; |
Sanjay R Mehta | 68d047c | 2020-04-27 23:56:41 -0500 | [diff] [blame] | 146 | u8 cmd_opcode; |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 147 | u8 *buf = NULL; |
| 148 | u32 m_cmd = 0; |
| 149 | u32 i = 0; |
| 150 | u32 tx_len = 0, rx_len = 0; |
| 151 | |
| 152 | list_for_each_entry(xfer, &message->transfers, |
| 153 | transfer_list) { |
| 154 | if (xfer->rx_buf) |
| 155 | m_cmd = AMD_SPI_XFER_RX; |
| 156 | if (xfer->tx_buf) |
| 157 | m_cmd = AMD_SPI_XFER_TX; |
| 158 | |
| 159 | if (m_cmd & AMD_SPI_XFER_TX) { |
| 160 | buf = (u8 *)xfer->tx_buf; |
| 161 | tx_len = xfer->len - 1; |
| 162 | cmd_opcode = *(u8 *)xfer->tx_buf; |
| 163 | buf++; |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 164 | amd_spi_set_opcode(amd_spi, cmd_opcode); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 165 | |
| 166 | /* Write data into the FIFO. */ |
| 167 | for (i = 0; i < tx_len; i++) { |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 168 | iowrite8(buf[i], ((u8 __iomem *)amd_spi->io_remap_addr + |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 169 | AMD_SPI_FIFO_BASE + i)); |
| 170 | } |
| 171 | |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 172 | amd_spi_set_tx_count(amd_spi, tx_len); |
| 173 | amd_spi_clear_fifo_ptr(amd_spi); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 174 | /* Execute command */ |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 175 | amd_spi_execute_opcode(amd_spi); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 176 | } |
| 177 | if (m_cmd & AMD_SPI_XFER_RX) { |
| 178 | /* |
| 179 | * Store no. of bytes to be received from |
| 180 | * FIFO |
| 181 | */ |
| 182 | rx_len = xfer->len; |
| 183 | buf = (u8 *)xfer->rx_buf; |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 184 | amd_spi_set_rx_count(amd_spi, rx_len); |
| 185 | amd_spi_clear_fifo_ptr(amd_spi); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 186 | /* Execute command */ |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 187 | amd_spi_execute_opcode(amd_spi); |
Lucas Tanure | 777a2cb | 2021-09-10 12:15:29 +0100 | [diff] [blame] | 188 | amd_spi_busy_wait(amd_spi); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 189 | /* Read data from FIFO to receive buffer */ |
| 190 | for (i = 0; i < rx_len; i++) |
Lucas Tanure | ca8e8a1 | 2021-09-10 12:15:26 +0100 | [diff] [blame] | 191 | buf[i] = amd_spi_readreg8(amd_spi, AMD_SPI_FIFO_BASE + tx_len + i); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 192 | } |
| 193 | } |
| 194 | |
| 195 | /* Update statistics */ |
| 196 | message->actual_length = tx_len + rx_len + 1; |
| 197 | /* complete the transaction */ |
| 198 | message->status = 0; |
| 199 | spi_finalize_current_message(master); |
| 200 | |
| 201 | return 0; |
| 202 | } |
| 203 | |
| 204 | static int amd_spi_master_transfer(struct spi_master *master, |
| 205 | struct spi_message *msg) |
| 206 | { |
| 207 | struct amd_spi *amd_spi = spi_master_get_devdata(master); |
| 208 | struct spi_device *spi = msg->spi; |
| 209 | |
Lucas Tanure | 3b02d28 | 2021-09-10 12:15:28 +0100 | [diff] [blame] | 210 | amd_spi_select_chip(amd_spi, spi->chip_select); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 211 | |
| 212 | /* |
| 213 | * Extract spi_transfers from the spi message and |
| 214 | * program the controller. |
| 215 | */ |
Lukas Wunner | 36c72a5 | 2020-05-04 13:12:05 +0200 | [diff] [blame] | 216 | amd_spi_fifo_xfer(amd_spi, master, msg); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 217 | |
| 218 | return 0; |
| 219 | } |
| 220 | |
| 221 | static int amd_spi_probe(struct platform_device *pdev) |
| 222 | { |
| 223 | struct device *dev = &pdev->dev; |
| 224 | struct spi_master *master; |
| 225 | struct amd_spi *amd_spi; |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 226 | int err = 0; |
| 227 | |
| 228 | /* Allocate storage for spi_master and driver private data */ |
| 229 | master = spi_alloc_master(dev, sizeof(struct amd_spi)); |
| 230 | if (!master) { |
| 231 | dev_err(dev, "Error allocating SPI master\n"); |
| 232 | return -ENOMEM; |
| 233 | } |
| 234 | |
| 235 | amd_spi = spi_master_get_devdata(master); |
Qing Zhang | 2ed6e3b | 2020-11-21 11:43:51 +0800 | [diff] [blame] | 236 | amd_spi->io_remap_addr = devm_platform_ioremap_resource(pdev, 0); |
Wei Yongjun | f84b604 | 2020-04-29 02:54:26 +0000 | [diff] [blame] | 237 | if (IS_ERR(amd_spi->io_remap_addr)) { |
| 238 | err = PTR_ERR(amd_spi->io_remap_addr); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 239 | dev_err(dev, "error %d ioremap of SPI registers failed\n", err); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 240 | goto err_free_master; |
| 241 | } |
| 242 | dev_dbg(dev, "io_remap_address: %p\n", amd_spi->io_remap_addr); |
| 243 | |
| 244 | /* Initialize the spi_master fields */ |
| 245 | master->bus_num = 0; |
| 246 | master->num_chipselect = 4; |
| 247 | master->mode_bits = 0; |
| 248 | master->flags = SPI_MASTER_HALF_DUPLEX; |
| 249 | master->setup = amd_spi_master_setup; |
| 250 | master->transfer_one_message = amd_spi_master_transfer; |
| 251 | |
| 252 | /* Register the controller with SPI framework */ |
Lukas Wunner | 7b9c94b | 2020-05-04 13:12:04 +0200 | [diff] [blame] | 253 | err = devm_spi_register_master(dev, master); |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 254 | if (err) { |
| 255 | dev_err(dev, "error %d registering SPI controller\n", err); |
Lukas Wunner | 2b60c49 | 2020-05-04 13:12:01 +0200 | [diff] [blame] | 256 | goto err_free_master; |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 257 | } |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 258 | |
| 259 | return 0; |
| 260 | |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 261 | err_free_master: |
| 262 | spi_master_put(master); |
| 263 | |
Lukas Wunner | cc17fbe | 2020-05-04 13:12:02 +0200 | [diff] [blame] | 264 | return err; |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 265 | } |
| 266 | |
Lee Jones | 85ed0f6 | 2020-07-17 14:54:24 +0100 | [diff] [blame] | 267 | #ifdef CONFIG_ACPI |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 268 | static const struct acpi_device_id spi_acpi_match[] = { |
| 269 | { "AMDI0061", 0 }, |
| 270 | {}, |
| 271 | }; |
| 272 | MODULE_DEVICE_TABLE(acpi, spi_acpi_match); |
Lee Jones | 85ed0f6 | 2020-07-17 14:54:24 +0100 | [diff] [blame] | 273 | #endif |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 274 | |
| 275 | static struct platform_driver amd_spi_driver = { |
| 276 | .driver = { |
| 277 | .name = "amd_spi", |
| 278 | .acpi_match_table = ACPI_PTR(spi_acpi_match), |
| 279 | }, |
| 280 | .probe = amd_spi_probe, |
Sanjay R Mehta | bbb336f | 2020-04-25 14:59:48 -0500 | [diff] [blame] | 281 | }; |
| 282 | |
| 283 | module_platform_driver(amd_spi_driver); |
| 284 | |
| 285 | MODULE_LICENSE("Dual BSD/GPL"); |
| 286 | MODULE_AUTHOR("Sanjay Mehta <sanju.mehta@amd.com>"); |
| 287 | MODULE_DESCRIPTION("AMD SPI Master Controller Driver"); |