| .. | .. |
|---|
| 3 | 3 | * Renesas USB |
|---|
| 4 | 4 | * |
|---|
| 5 | 5 | * Copyright (C) 2011 Renesas Solutions Corp. |
|---|
| 6 | + * Copyright (C) 2019 Renesas Electronics Corporation |
|---|
| 6 | 7 | * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
|---|
| 7 | 8 | * |
|---|
| 8 | 9 | * This program is distributed in the hope that it will be useful, |
|---|
| .. | .. |
|---|
| 30 | 31 | USBHS_HOST = 0, |
|---|
| 31 | 32 | USBHS_GADGET, |
|---|
| 32 | 33 | USBHS_MAX, |
|---|
| 33 | | -}; |
|---|
| 34 | | - |
|---|
| 35 | | -/* |
|---|
| 36 | | - * callback functions table for driver |
|---|
| 37 | | - * |
|---|
| 38 | | - * These functions are called from platform for driver. |
|---|
| 39 | | - * Callback function's pointer will be set before |
|---|
| 40 | | - * renesas_usbhs_platform_callback :: hardware_init was called |
|---|
| 41 | | - */ |
|---|
| 42 | | -struct renesas_usbhs_driver_callback { |
|---|
| 43 | | - int (*notify_hotplug)(struct platform_device *pdev); |
|---|
| 44 | 34 | }; |
|---|
| 45 | 35 | |
|---|
| 46 | 36 | /* |
|---|
| .. | .. |
|---|
| 180 | 170 | */ |
|---|
| 181 | 171 | int pio_dma_border; /* default is 64byte */ |
|---|
| 182 | 172 | |
|---|
| 183 | | - uintptr_t type; |
|---|
| 184 | | - u32 enable_gpio; |
|---|
| 185 | | - |
|---|
| 186 | 173 | /* |
|---|
| 187 | 174 | * option: |
|---|
| 188 | 175 | */ |
|---|
| 189 | | - u32 has_otg:1; /* for controlling PWEN/EXTLP */ |
|---|
| 190 | | - u32 has_sudmac:1; /* for SUDMAC */ |
|---|
| 191 | 176 | u32 has_usb_dmac:1; /* for USB-DMAC */ |
|---|
| 177 | + u32 runtime_pwctrl:1; |
|---|
| 178 | + u32 has_cnen:1; |
|---|
| 179 | + u32 cfifo_byte_addr:1; /* CFIFO is byte addressable */ |
|---|
| 192 | 180 | #define USBHS_USB_DMAC_XFER_SIZE 32 /* hardcode the xfer size */ |
|---|
| 181 | + u32 multi_clks:1; |
|---|
| 182 | + u32 has_new_pipe_configs:1; |
|---|
| 193 | 183 | }; |
|---|
| 194 | | - |
|---|
| 195 | | -#define USBHS_TYPE_RCAR_GEN2 1 |
|---|
| 196 | | -#define USBHS_TYPE_RCAR_GEN3 2 |
|---|
| 197 | | -#define USBHS_TYPE_RCAR_GEN3_WITH_PLL 3 |
|---|
| 198 | | -#define USBHS_TYPE_RZA1 4 |
|---|
| 199 | 184 | |
|---|
| 200 | 185 | /* |
|---|
| 201 | 186 | * option: |
|---|
| .. | .. |
|---|
| 212 | 197 | struct renesas_usbhs_platform_callback platform_callback; |
|---|
| 213 | 198 | |
|---|
| 214 | 199 | /* |
|---|
| 215 | | - * driver set these callback functions pointer. |
|---|
| 216 | | - * platform can use it on callback functions |
|---|
| 217 | | - */ |
|---|
| 218 | | - struct renesas_usbhs_driver_callback driver_callback; |
|---|
| 219 | | - |
|---|
| 220 | | - /* |
|---|
| 221 | 200 | * option: |
|---|
| 222 | 201 | * |
|---|
| 223 | 202 | * driver use these param for some register |
|---|
| .. | .. |
|---|
| 230 | 209 | */ |
|---|
| 231 | 210 | #define renesas_usbhs_get_info(pdev)\ |
|---|
| 232 | 211 | ((struct renesas_usbhs_platform_info *)(pdev)->dev.platform_data) |
|---|
| 233 | | - |
|---|
| 234 | | -#define renesas_usbhs_call_notify_hotplug(pdev) \ |
|---|
| 235 | | - ({ \ |
|---|
| 236 | | - struct renesas_usbhs_driver_callback *dc; \ |
|---|
| 237 | | - dc = &(renesas_usbhs_get_info(pdev)->driver_callback); \ |
|---|
| 238 | | - if (dc && dc->notify_hotplug) \ |
|---|
| 239 | | - dc->notify_hotplug(pdev); \ |
|---|
| 240 | | - }) |
|---|
| 241 | 212 | #endif /* RENESAS_USB_H */ |
|---|