Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2006 Ben Warren, Qstreams Networks Inc. |
Stefan Roese | a47a12b | 2010-04-15 16:07:28 +0200 | [diff] [blame] | 4 | * With help from the common/soft_spi and arch/powerpc/cpu/mpc8260 drivers |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <common.h> |
Rasmus Villemoes | 4856cc7 | 2020-02-11 15:20:25 +0000 | [diff] [blame^] | 8 | #include <clk.h> |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 9 | #include <dm.h> |
| 10 | #include <errno.h> |
Haavard Skinnemoen | d255bb0 | 2008-05-16 11:10:31 +0200 | [diff] [blame] | 11 | #include <malloc.h> |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 12 | #include <spi.h> |
| 13 | #include <asm/mpc8xxx_spi.h> |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 14 | #include <asm-generic/gpio.h> |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 15 | |
Mario Six | 6ea9395 | 2019-04-29 01:58:41 +0530 | [diff] [blame] | 16 | enum { |
| 17 | SPI_EV_NE = BIT(31 - 22), /* Receiver Not Empty */ |
| 18 | SPI_EV_NF = BIT(31 - 23), /* Transmitter Not Full */ |
| 19 | }; |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 20 | |
Mario Six | 6ea9395 | 2019-04-29 01:58:41 +0530 | [diff] [blame] | 21 | enum { |
| 22 | SPI_MODE_LOOP = BIT(31 - 1), /* Loopback mode */ |
| 23 | SPI_MODE_CI = BIT(31 - 2), /* Clock invert */ |
| 24 | SPI_MODE_CP = BIT(31 - 3), /* Clock phase */ |
| 25 | SPI_MODE_DIV16 = BIT(31 - 4), /* Divide clock source by 16 */ |
| 26 | SPI_MODE_REV = BIT(31 - 5), /* Reverse mode - MSB first */ |
| 27 | SPI_MODE_MS = BIT(31 - 6), /* Always master */ |
| 28 | SPI_MODE_EN = BIT(31 - 7), /* Enable interface */ |
| 29 | |
| 30 | SPI_MODE_LEN_MASK = 0xf00000, |
Rasmus Villemoes | 391c400 | 2020-02-11 15:20:25 +0000 | [diff] [blame] | 31 | SPI_MODE_LEN_SHIFT = 20, |
Rasmus Villemoes | 4856cc7 | 2020-02-11 15:20:25 +0000 | [diff] [blame^] | 32 | SPI_MODE_PM_SHIFT = 16, |
Mario Six | 6ea9395 | 2019-04-29 01:58:41 +0530 | [diff] [blame] | 33 | SPI_MODE_PM_MASK = 0xf0000, |
| 34 | |
| 35 | SPI_COM_LST = BIT(31 - 9), |
| 36 | }; |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 37 | |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 38 | struct mpc8xxx_priv { |
| 39 | spi8xxx_t *spi; |
| 40 | struct gpio_desc gpios[16]; |
Rasmus Villemoes | 1a7b462 | 2020-02-11 15:20:24 +0000 | [diff] [blame] | 41 | int cs_count; |
Rasmus Villemoes | 4856cc7 | 2020-02-11 15:20:25 +0000 | [diff] [blame^] | 42 | ulong clk_rate; |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 43 | }; |
| 44 | |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 45 | #define SPI_TIMEOUT 1000 |
| 46 | |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 47 | static int mpc8xxx_spi_ofdata_to_platdata(struct udevice *dev) |
Haavard Skinnemoen | d255bb0 | 2008-05-16 11:10:31 +0200 | [diff] [blame] | 48 | { |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 49 | struct mpc8xxx_priv *priv = dev_get_priv(dev); |
Rasmus Villemoes | 4856cc7 | 2020-02-11 15:20:25 +0000 | [diff] [blame^] | 50 | struct clk clk; |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 51 | int ret; |
| 52 | |
| 53 | priv->spi = (spi8xxx_t *)dev_read_addr(dev); |
| 54 | |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 55 | ret = gpio_request_list_by_name(dev, "gpios", priv->gpios, |
| 56 | ARRAY_SIZE(priv->gpios), GPIOD_IS_OUT | GPIOD_ACTIVE_LOW); |
| 57 | if (ret < 0) |
| 58 | return -EINVAL; |
| 59 | |
Rasmus Villemoes | 1a7b462 | 2020-02-11 15:20:24 +0000 | [diff] [blame] | 60 | priv->cs_count = ret; |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 61 | |
Rasmus Villemoes | 4856cc7 | 2020-02-11 15:20:25 +0000 | [diff] [blame^] | 62 | ret = clk_get_by_index(dev, 0, &clk); |
| 63 | if (ret) { |
| 64 | dev_err(dev, "%s: clock not defined\n", __func__); |
| 65 | return ret; |
| 66 | } |
| 67 | |
| 68 | priv->clk_rate = clk_get_rate(&clk); |
| 69 | if (!priv->clk_rate) { |
| 70 | dev_err(dev, "%s: failed to get clock rate\n", __func__); |
| 71 | return -EINVAL; |
| 72 | } |
| 73 | |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 74 | return 0; |
Haavard Skinnemoen | d255bb0 | 2008-05-16 11:10:31 +0200 | [diff] [blame] | 75 | } |
| 76 | |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 77 | static int mpc8xxx_spi_probe(struct udevice *dev) |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 78 | { |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 79 | struct mpc8xxx_priv *priv = dev_get_priv(dev); |
Rasmus Villemoes | 391c400 | 2020-02-11 15:20:25 +0000 | [diff] [blame] | 80 | spi8xxx_t *spi = priv->spi; |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 81 | |
Kim Phillips | 2956acd | 2008-01-17 12:48:00 -0600 | [diff] [blame] | 82 | /* |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 83 | * SPI pins on the MPC83xx are not muxed, so all we do is initialize |
| 84 | * some registers |
Kim Phillips | 2956acd | 2008-01-17 12:48:00 -0600 | [diff] [blame] | 85 | */ |
Rasmus Villemoes | 391c400 | 2020-02-11 15:20:25 +0000 | [diff] [blame] | 86 | out_be32(&priv->spi->mode, SPI_MODE_REV | SPI_MODE_MS); |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 87 | |
Rasmus Villemoes | 391c400 | 2020-02-11 15:20:25 +0000 | [diff] [blame] | 88 | /* set len to 8 bits */ |
| 89 | setbits_be32(&spi->mode, (8 - 1) << SPI_MODE_LEN_SHIFT); |
| 90 | |
Rasmus Villemoes | 391c400 | 2020-02-11 15:20:25 +0000 | [diff] [blame] | 91 | setbits_be32(&spi->mode, SPI_MODE_EN); |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 92 | |
| 93 | /* Clear all SPI events */ |
| 94 | setbits_be32(&priv->spi->event, 0xffffffff); |
| 95 | /* Mask all SPI interrupts */ |
| 96 | clrbits_be32(&priv->spi->mask, 0xffffffff); |
| 97 | /* LST bit doesn't do anything, so disregard */ |
| 98 | out_be32(&priv->spi->com, 0); |
| 99 | |
Haavard Skinnemoen | d255bb0 | 2008-05-16 11:10:31 +0200 | [diff] [blame] | 100 | return 0; |
| 101 | } |
| 102 | |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 103 | static void mpc8xxx_spi_cs_activate(struct udevice *dev) |
Haavard Skinnemoen | d255bb0 | 2008-05-16 11:10:31 +0200 | [diff] [blame] | 104 | { |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 105 | struct mpc8xxx_priv *priv = dev_get_priv(dev->parent); |
| 106 | struct dm_spi_slave_platdata *platdata = dev_get_parent_platdata(dev); |
| 107 | |
| 108 | dm_gpio_set_dir_flags(&priv->gpios[platdata->cs], GPIOD_IS_OUT); |
| 109 | dm_gpio_set_value(&priv->gpios[platdata->cs], 0); |
Haavard Skinnemoen | d255bb0 | 2008-05-16 11:10:31 +0200 | [diff] [blame] | 110 | } |
| 111 | |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 112 | static void mpc8xxx_spi_cs_deactivate(struct udevice *dev) |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 113 | { |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 114 | struct mpc8xxx_priv *priv = dev_get_priv(dev->parent); |
| 115 | struct dm_spi_slave_platdata *platdata = dev_get_parent_platdata(dev); |
| 116 | |
| 117 | dm_gpio_set_dir_flags(&priv->gpios[platdata->cs], GPIOD_IS_OUT); |
| 118 | dm_gpio_set_value(&priv->gpios[platdata->cs], 1); |
| 119 | } |
| 120 | |
| 121 | static int mpc8xxx_spi_xfer(struct udevice *dev, uint bitlen, |
| 122 | const void *dout, void *din, ulong flags) |
| 123 | { |
| 124 | struct udevice *bus = dev->parent; |
| 125 | struct mpc8xxx_priv *priv = dev_get_priv(bus); |
| 126 | spi8xxx_t *spi = priv->spi; |
| 127 | struct dm_spi_slave_platdata *platdata = dev_get_parent_platdata(dev); |
Rasmus Villemoes | 391c400 | 2020-02-11 15:20:25 +0000 | [diff] [blame] | 128 | u32 tmpdin = 0, tmpdout = 0, n; |
| 129 | const u8 *cout = dout; |
| 130 | u8 *cin = din; |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 131 | |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 132 | debug("%s: slave %s:%u dout %08X din %08X bitlen %u\n", __func__, |
Rasmus Villemoes | 391c400 | 2020-02-11 15:20:25 +0000 | [diff] [blame] | 133 | bus->name, platdata->cs, (uint)dout, (uint)din, bitlen); |
Rasmus Villemoes | 1a7b462 | 2020-02-11 15:20:24 +0000 | [diff] [blame] | 134 | if (platdata->cs >= priv->cs_count) { |
| 135 | dev_err(dev, "chip select index %d too large (cs_count=%d)\n", |
| 136 | platdata->cs, priv->cs_count); |
| 137 | return -EINVAL; |
| 138 | } |
Rasmus Villemoes | 391c400 | 2020-02-11 15:20:25 +0000 | [diff] [blame] | 139 | if (bitlen % 8) { |
| 140 | printf("*** spi_xfer: bitlen must be multiple of 8\n"); |
| 141 | return -ENOTSUPP; |
| 142 | } |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 143 | |
Haavard Skinnemoen | d255bb0 | 2008-05-16 11:10:31 +0200 | [diff] [blame] | 144 | if (flags & SPI_XFER_BEGIN) |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 145 | mpc8xxx_spi_cs_activate(dev); |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 146 | |
Mario Six | d93fe31 | 2019-04-29 01:58:37 +0530 | [diff] [blame] | 147 | /* Clear all SPI events */ |
Mario Six | 1a907e4 | 2019-04-29 01:58:42 +0530 | [diff] [blame] | 148 | setbits_be32(&spi->event, 0xffffffff); |
Rasmus Villemoes | 391c400 | 2020-02-11 15:20:25 +0000 | [diff] [blame] | 149 | n = bitlen / 8; |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 150 | |
Rasmus Villemoes | 391c400 | 2020-02-11 15:20:25 +0000 | [diff] [blame] | 151 | /* Handle data in 8-bit chunks */ |
| 152 | while (n--) { |
Mario Six | 67adbae | 2019-04-29 01:58:52 +0530 | [diff] [blame] | 153 | ulong start; |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 154 | |
Rasmus Villemoes | 391c400 | 2020-02-11 15:20:25 +0000 | [diff] [blame] | 155 | if (cout) |
| 156 | tmpdout = *cout++; |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 157 | |
Mario Six | d93fe31 | 2019-04-29 01:58:37 +0530 | [diff] [blame] | 158 | /* Write the data out */ |
Mario Six | 1a907e4 | 2019-04-29 01:58:42 +0530 | [diff] [blame] | 159 | out_be32(&spi->tx, tmpdout); |
Mario Six | d93fe31 | 2019-04-29 01:58:37 +0530 | [diff] [blame] | 160 | |
Mario Six | fabe6c4 | 2019-04-29 01:58:40 +0530 | [diff] [blame] | 161 | debug("*** %s: ... %08x written\n", __func__, tmpdout); |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 162 | |
Kim Phillips | 2956acd | 2008-01-17 12:48:00 -0600 | [diff] [blame] | 163 | /* |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 164 | * Wait for SPI transmit to get out |
| 165 | * or time out (1 second = 1000 ms) |
| 166 | * The NE event must be read and cleared first |
Kim Phillips | 2956acd | 2008-01-17 12:48:00 -0600 | [diff] [blame] | 167 | */ |
Mario Six | 67adbae | 2019-04-29 01:58:52 +0530 | [diff] [blame] | 168 | start = get_timer(0); |
| 169 | do { |
Mario Six | 65f88e0 | 2019-04-29 01:58:46 +0530 | [diff] [blame] | 170 | u32 event = in_be32(&spi->event); |
Mario Six | 6409c61 | 2019-04-29 01:58:44 +0530 | [diff] [blame] | 171 | bool have_ne = event & SPI_EV_NE; |
| 172 | bool have_nf = event & SPI_EV_NF; |
| 173 | |
Mario Six | e4da4c2 | 2019-04-29 01:58:45 +0530 | [diff] [blame] | 174 | if (!have_ne) |
| 175 | continue; |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 176 | |
Mario Six | e4da4c2 | 2019-04-29 01:58:45 +0530 | [diff] [blame] | 177 | tmpdin = in_be32(&spi->rx); |
| 178 | setbits_be32(&spi->event, SPI_EV_NE); |
| 179 | |
Rasmus Villemoes | 391c400 | 2020-02-11 15:20:25 +0000 | [diff] [blame] | 180 | if (cin) |
| 181 | *cin++ = tmpdin; |
Mario Six | e4da4c2 | 2019-04-29 01:58:45 +0530 | [diff] [blame] | 182 | |
Kim Phillips | 2956acd | 2008-01-17 12:48:00 -0600 | [diff] [blame] | 183 | /* |
| 184 | * Only bail when we've had both NE and NF events. |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 185 | * This will cause timeouts on RO devices, so maybe |
| 186 | * in the future put an arbitrary delay after writing |
Kim Phillips | 2956acd | 2008-01-17 12:48:00 -0600 | [diff] [blame] | 187 | * the device. Arbitrary delays suck, though... |
| 188 | */ |
Mario Six | e4da4c2 | 2019-04-29 01:58:45 +0530 | [diff] [blame] | 189 | if (have_nf) |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 190 | break; |
Mario Six | e4da4c2 | 2019-04-29 01:58:45 +0530 | [diff] [blame] | 191 | |
Mario Six | 67adbae | 2019-04-29 01:58:52 +0530 | [diff] [blame] | 192 | mdelay(1); |
| 193 | } while (get_timer(start) < SPI_TIMEOUT); |
| 194 | |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 195 | if (get_timer(start) >= SPI_TIMEOUT) { |
Mario Six | fabe6c4 | 2019-04-29 01:58:40 +0530 | [diff] [blame] | 196 | debug("*** %s: Time out during SPI transfer\n", |
| 197 | __func__); |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 198 | return -ETIMEDOUT; |
| 199 | } |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 200 | |
Mario Six | fabe6c4 | 2019-04-29 01:58:40 +0530 | [diff] [blame] | 201 | debug("*** %s: transfer ended. Value=%08x\n", __func__, tmpdin); |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 202 | } |
| 203 | |
Haavard Skinnemoen | d255bb0 | 2008-05-16 11:10:31 +0200 | [diff] [blame] | 204 | if (flags & SPI_XFER_END) |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 205 | mpc8xxx_spi_cs_deactivate(dev); |
Kim Phillips | 2956acd | 2008-01-17 12:48:00 -0600 | [diff] [blame] | 206 | |
Ben Warren | 04a9e11 | 2008-01-16 22:37:35 -0500 | [diff] [blame] | 207 | return 0; |
| 208 | } |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 209 | |
| 210 | static int mpc8xxx_spi_set_speed(struct udevice *dev, uint speed) |
| 211 | { |
Rasmus Villemoes | 4856cc7 | 2020-02-11 15:20:25 +0000 | [diff] [blame^] | 212 | struct mpc8xxx_priv *priv = dev_get_priv(dev); |
| 213 | spi8xxx_t *spi = priv->spi; |
| 214 | u32 bits, mask, div16, pm; |
| 215 | u32 mode; |
| 216 | ulong clk; |
| 217 | |
| 218 | clk = priv->clk_rate; |
| 219 | if (clk / 64 > speed) { |
| 220 | div16 = SPI_MODE_DIV16; |
| 221 | clk /= 16; |
| 222 | } else { |
| 223 | div16 = 0; |
| 224 | } |
| 225 | pm = (clk - 1)/(4*speed) + 1; |
| 226 | if (pm > 16) { |
| 227 | dev_err(dev, "requested speed %u too small\n", speed); |
| 228 | return -EINVAL; |
| 229 | } |
| 230 | pm--; |
| 231 | |
| 232 | bits = div16 | (pm << SPI_MODE_PM_SHIFT); |
| 233 | mask = SPI_MODE_DIV16 | SPI_MODE_PM_MASK; |
| 234 | mode = in_be32(&spi->mode); |
| 235 | if ((mode & mask) != bits) { |
| 236 | /* Must clear mode[EN] while changing speed. */ |
| 237 | mode &= ~(mask | SPI_MODE_EN); |
| 238 | out_be32(&spi->mode, mode); |
| 239 | mode |= bits; |
| 240 | out_be32(&spi->mode, mode); |
| 241 | mode |= SPI_MODE_EN; |
| 242 | out_be32(&spi->mode, mode); |
| 243 | } |
| 244 | |
| 245 | debug("requested speed %u, set speed to %lu/(%s4*%u) == %lu\n", |
| 246 | speed, priv->clk_rate, div16 ? "16*" : "", pm + 1, |
| 247 | clk/(4*(pm + 1))); |
| 248 | |
Rasmus Villemoes | 391c400 | 2020-02-11 15:20:25 +0000 | [diff] [blame] | 249 | return 0; |
Jagan Teki | c1a3f1e | 2019-04-29 01:58:53 +0530 | [diff] [blame] | 250 | } |
| 251 | |
| 252 | static int mpc8xxx_spi_set_mode(struct udevice *dev, uint mode) |
| 253 | { |
| 254 | /* TODO(mario.six@gdsys.cc): Using SPI_CPHA (for clock phase) and |
| 255 | * SPI_CPOL (for clock polarity) should work |
| 256 | */ |
| 257 | return 0; |
| 258 | } |
| 259 | |
| 260 | static const struct dm_spi_ops mpc8xxx_spi_ops = { |
| 261 | .xfer = mpc8xxx_spi_xfer, |
| 262 | .set_speed = mpc8xxx_spi_set_speed, |
| 263 | .set_mode = mpc8xxx_spi_set_mode, |
| 264 | /* |
| 265 | * cs_info is not needed, since we require all chip selects to be |
| 266 | * in the device tree explicitly |
| 267 | */ |
| 268 | }; |
| 269 | |
| 270 | static const struct udevice_id mpc8xxx_spi_ids[] = { |
| 271 | { .compatible = "fsl,spi" }, |
| 272 | { } |
| 273 | }; |
| 274 | |
| 275 | U_BOOT_DRIVER(mpc8xxx_spi) = { |
| 276 | .name = "mpc8xxx_spi", |
| 277 | .id = UCLASS_SPI, |
| 278 | .of_match = mpc8xxx_spi_ids, |
| 279 | .ops = &mpc8xxx_spi_ops, |
| 280 | .ofdata_to_platdata = mpc8xxx_spi_ofdata_to_platdata, |
| 281 | .probe = mpc8xxx_spi_probe, |
| 282 | .priv_auto_alloc_size = sizeof(struct mpc8xxx_priv), |
| 283 | }; |