Commit 2776f362 authored by mntmn's avatar mntmn

introduce USB storage; add 640x512 mode; tweak vcap centering;

parent c402a9a8
......@@ -387,6 +387,10 @@ void pixelclock_init(int mhz) {
mul = 27;
div = 2;
otherdiv = 50;
} else if (mhz == 54) {
mul = 27;
div = 1;
otherdiv = 50;
} else if (mhz == 150) {
mul = 15;
div = 1;
......@@ -395,10 +399,6 @@ void pixelclock_init(int mhz) {
mul = 15;
div = 1;
otherdiv = 60;
} else if (mhz == 27) { // 25.205
mul = 27;
div = 2;
otherdiv = 50;
} else if (mhz == 108) {
mul = 54;
div = 5;
......@@ -550,9 +550,16 @@ void video_system_init(int hres, int vres, int htotal, int vtotal, int mhz,
#define MNT_BASE_EVENT_SERIAL MNT_REG_BASE+0xb0
#define MNT_BASE_EVENT_CODE MNT_REG_BASE+0xb2
#define MNT_BASE_FW_VERSION MNT_REG_BASE+0xc0
#define MNT_BASE_USBBLK_TX_HI MNT_REG_BASE+0xd0
#define MNT_BASE_USBBLK_TX_LO MNT_REG_BASE+0xd2
#define MNT_BASE_USBBLK_RX_HI MNT_REG_BASE+0xd4
#define MNT_BASE_USBBLK_RX_LO MNT_REG_BASE+0xd6
#define MNT_BASE_USB_STATUS MNT_REG_BASE+0xd8
#define MNT_BASE_USB_BUFSEL MNT_REG_BASE+0xda
#define MNT_BASE_USB_CAPACITY MNT_REG_BASE+0xdc
#define REVISION_MAJOR 1
#define REVISION_MINOR 4
#define REVISION_MINOR 5
#define ZZVMODE_1280x720 0
#define ZZVMODE_800x600 1
......@@ -563,6 +570,7 @@ void video_system_init(int hres, int vres, int htotal, int vtotal, int mhz,
#define ZZVMODE_720x576 6 // 50hz
#define ZZVMODE_1920x1080_50 7 // 50hz
#define ZZVMODE_720x480 8
#define ZZVMODE_640x512 9
void video_mode_init(int mode, int scalemode, int colormode) {
int hres, vres, hmax, vmax, hstart, hend, vstart, vend, polarity, mhz, vhz, hdmi;
......@@ -621,6 +629,20 @@ void video_mode_init(int mode, int scalemode, int colormode) {
vhz = 60;
hdmi = 0;
break;
case ZZVMODE_640x512:
hres = 640;
vres = 512;
hstart = 840;
hend = 968;
hmax = 1056;
vstart = 601;
vend = 605;
vmax = 628;
polarity = 0;
mhz = 40;
vhz = 60;
hdmi = 0;
break;
case ZZVMODE_720x480:
hres = 720;
vres = 480;
......@@ -791,18 +813,34 @@ void sprite_reset() {
// default to more compatible 60hz mode
static int videocap_video_mode = ZZVMODE_800x600;
static int video_mode = ZZVMODE_800x600 | 2 << 12 | MNTVA_COLOR_32BIT << 8;
static int default_pan_offset = 0x00e00bd0;
static int default_pan_offset = 0x00e00bf8;
static char usb_storage_available = 0;
static uint32_t usb_storage_read_block = 0;
static uint32_t usb_storage_write_block = 0;
// ethernet state
uint16_t ethernet_send_result = 0;
// usb state
uint16_t usb_status = 0;
// we can read or write a number of USB blocks at once, and amiga can select which one is mapped at the USB storage buffer area
uint32_t usb_selected_buffer_block = 0;
uint32_t usb_read_write_num_blocks = 1;
void videocap_area_clear() {
fb_fill(0x00e00000 / 4);
}
void handle_amiga_reset() {
void reset_default_videocap_pan() {
if (videocap_video_mode == ZZVMODE_800x600) {
default_pan_offset = 0x00e00bd0;
default_pan_offset = 0x00e00bf8;
} else {
default_pan_offset = 0x00e00000;
}
}
void handle_amiga_reset() {
reset_default_videocap_pan();
framebuffer_pan_offset = default_pan_offset;
videocap_area_clear();
......@@ -820,10 +858,17 @@ void handle_amiga_reset() {
video_mode_init(videocap_video_mode, 2, MNTVA_COLOR_32BIT);
video_mode = videocap_video_mode | 2 << 12 | MNTVA_COLOR_32BIT << 8;
test_usb();
ethernet_init();
sprite_reset();
ethernet_init();
usb_storage_available = zz_usb_init();
usb_status = 0;
usb_selected_buffer_block = 0;
usb_read_write_num_blocks = 1;
ethernet_send_result = 0;
// FIXME there should be more state to be reset
}
uint16_t arm_app_output_event_serial = 0;
......@@ -1038,9 +1083,6 @@ int main() {
arm_run_env.argc = 0;
uint32_t arm_run_address = 0;
// ethernet state
uint16_t ethernet_send_result = 0;
// zorro state
u32 zstate_raw;
int interlace_old = 0;
......@@ -1106,12 +1148,14 @@ int main() {
ptr = mem + zaddr - MNT_FB_BASE;
} else if (zaddr < MNT_REG_BASE + 0x8000) {
// FIXME remove
ptr = (u8*) (RX_FRAME_ADDRESS + zaddr
- (MNT_REG_BASE + 0x2000));
printf("ERXF write: %08lx\n", (u32) ptr);
ptr = (u8*) (RX_FRAME_ADDRESS + zaddr - (MNT_REG_BASE + 0x2000));
//printf("ERXF write: %08lx\n", (u32) ptr);
} else if (zaddr < MNT_REG_BASE + 0xa000) {
ptr = (u8*) (TX_FRAME_ADDRESS + zaddr - (MNT_REG_BASE + 0x8000));
} else if (zaddr < MNT_REG_BASE + 0x10000) {
ptr = (u8*) (TX_FRAME_ADDRESS + zaddr
- (MNT_REG_BASE + 0x8000));
// 0xa000-0xafff: write to block device (usb storage)
// TODO: this should be moved to DMA space?
ptr = (u8*) (USB_BLOCK_STORAGE_ADDRESS + zaddr - (MNT_REG_BASE + 0xa000) + usb_selected_buffer_block * 512);
}
// FIXME cache this
......@@ -1496,6 +1540,47 @@ int main() {
ethernet_update_mac_address();
break;
}
case MNT_BASE_USBBLK_TX_HI: {
usb_storage_write_block = ((u32) zdata) << 16;
break;
}
case MNT_BASE_USBBLK_TX_LO: {
usb_storage_write_block |= zdata;
if (usb_storage_available) {
usb_status = zz_usb_write_blocks(0, usb_storage_write_block, usb_read_write_num_blocks, (void*)USB_BLOCK_STORAGE_ADDRESS);
} else {
printf("[USB] TX but no storage available!\n");
}
break;
}
case MNT_BASE_USBBLK_RX_HI: {
usb_storage_read_block = ((u32) zdata) << 16;
break;
}
case MNT_BASE_USBBLK_RX_LO: {
usb_storage_read_block |= zdata;
if (usb_storage_available) {
usb_status = zz_usb_read_blocks(0, usb_storage_read_block, usb_read_write_num_blocks, (void*)USB_BLOCK_STORAGE_ADDRESS);
} else {
printf("[USB] RX but no storage available!\n");
}
break;
}
case MNT_BASE_USB_STATUS: {
//printf("[USB] write to status/blocknum register: %d\n", zdata);
if (zdata==0) {
// reset USB
// FIXME memory leaks?
//usb_storage_available = zz_usb_init();
} else {
// set number of blocks to read/write at once
usb_read_write_num_blocks = zdata;
}
}
case MNT_BASE_USB_BUFSEL: {
//printf("[USB] select buffer: %d\n", zdata);
usb_selected_buffer_block = zdata;
}
// ARM core 2 execution
case MNT_BASE_RUN_HI:
......@@ -1598,17 +1683,22 @@ int main() {
u8* ptr = mem;
if (zaddr >= MNT_FB_BASE) {
// read from framebuffer / generic memory
ptr = mem + zaddr - MNT_FB_BASE;
} else if (zaddr < MNT_REG_BASE + 0x8000) {
// 0x2000-0x7fff: FIXME: waste of address space
// read from ethernet RX frame
// disable INT6 interrupt
mntzorro_write(MNTZ_BASE_ADDR, MNTZORRO_REG2,
(1 << 30) | 0);
ptr = (u8*) (ethernet_current_receive_ptr() + zaddr
- (MNT_REG_BASE + 0x2000));
mntzorro_write(MNTZ_BASE_ADDR, MNTZORRO_REG2, (1 << 30) | 0);
ptr = (u8*) (ethernet_current_receive_ptr() + zaddr - (MNT_REG_BASE + 0x2000));
} else if (zaddr < MNT_REG_BASE + 0xa000) {
// 0x8000-0x9fff: read from TX frame (unusual)
ptr = (u8*) (TX_FRAME_ADDRESS + zaddr - (MNT_REG_BASE + 0x8000));
//printf("ETXF read: %08lx\n", (u32) ptr);
} else if (zaddr < MNT_REG_BASE + 0x10000) {
ptr = (u8*) (TX_FRAME_ADDRESS + zaddr
- (MNT_REG_BASE + 0x8000));
printf("ETXF read: %08lx\n", (u32) ptr);
// 0xa000-0xafff: read from block device (usb storage)
// TODO: this should be moved to DMA space?
ptr = (u8*) (USB_BLOCK_STORAGE_ADDRESS + zaddr - (MNT_REG_BASE + 0xa000) + usb_selected_buffer_block * 512);
}
if (z3) {
......@@ -1640,10 +1730,21 @@ int main() {
uint8_t* mac = ethernet_get_mac_address_ptr();
data = mac[4] << 24 | mac[5] << 16;
} else if (zaddr32 == MNT_BASE_ETH_TX) {
// FIXME this is probably wrong (doesn't need swapping?)
data = (ethernet_send_result & 0xff) << 24
| (ethernet_send_result & 0xff00) << 16;
} else if (zaddr32 == MNT_BASE_FW_VERSION) {
data = (REVISION_MAJOR << 24 | REVISION_MINOR << 16);
} else if (zaddr32 == MNT_BASE_USB_STATUS) {
data = usb_status << 16;
} else if (zaddr32 == MNT_BASE_USB_CAPACITY) {
if (usb_storage_available) {
printf("[USB] query capacity: %lx\n",zz_usb_storage_capacity(0));
data = zz_usb_storage_capacity(0);
} else {
printf("[USB] query capacity: no device.\n");
data = 0;
}
}
if (z3) {
......@@ -1654,8 +1755,7 @@ int main() {
mntzorro_write(MNTZ_BASE_ADDR, MNTZORRO_REG1, data);
} else {
// upper 16 bit
mntzorro_write(MNTZ_BASE_ADDR, MNTZORRO_REG1,
data >> 16);
mntzorro_write(MNTZ_BASE_ADDR, MNTZORRO_REG1, data >> 16);
}
}
}
......@@ -1703,12 +1803,7 @@ int main() {
video_mode_init(ZZVMODE_720x480, 2, MNTVA_COLOR_32BIT);
} else {
// PAL
// FIXME duplication
if (videocap_video_mode == ZZVMODE_800x600) {
default_pan_offset = 0x00e00bd0;
} else {
default_pan_offset = 0x00e00000;
}
reset_default_videocap_pan();
framebuffer_pan_offset = default_pan_offset;
video_mode_init(videocap_video_mode, 2, MNTVA_COLOR_32BIT);
}
......
......@@ -25,6 +25,8 @@
#include "xparameters.h"
#include <xscugic.h>
#include "usb/ehci.h"
#include "usb/usb.h"
#include "ethernet.h"
struct zynq_ehci_priv _zynq_ehci;
......@@ -38,10 +40,34 @@ capabilities by an exchange of device requests. The requests that the host uses
standard requests and must support these requests on all USB devices."
*/
void test_usb() {
// returns 1 if storage device available
int zz_usb_init() {
printf("[USB] trying to probe zynq ehci...\n");
ehci_zynq_probe(&_zynq_ehci);
printf("[USB] probed!\n");
usb_init();
printf("[USB] initialized!\n");
if (!usb_stor_scan(1)) {
return 1;
}
return 0;
}
unsigned long zz_usb_read_blocks(int dev_index, unsigned long blknr, unsigned long blkcnt, void *buffer) {
int res = usb_stor_read_direct(dev_index, blknr, blkcnt, buffer);
//printf("[USB] read %lu blocks at %lu: %d\n",blkcnt,blknr,res);
return res;
}
unsigned long zz_usb_write_blocks(int dev_index, unsigned long blknr, unsigned long blkcnt, void *buffer) {
int res = usb_stor_write_direct(dev_index, blknr, blkcnt, buffer);
//printf("[USB] write %lu blocks at %lu: %d\n",blkcnt,blknr,res);
return res;
}
unsigned long zz_usb_storage_capacity(int dev_index) {
unsigned long cap = usb_stor_get_capacity(dev_index);
printf("[USB] get capacity: %lx\n",cap);
return cap;
}
void test_usb();
int zz_usb_init();
unsigned long zz_usb_read_blocks(int dev_index, unsigned long blknr, unsigned long blkcnt, void *buffer);
unsigned long zz_usb_write_blocks(int dev_index, unsigned long blknr, unsigned long blkcnt, void *buffer);
unsigned long zz_usb_storage_capacity(int dev_index);
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2000-2004
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*/
#ifndef BLK_H
#define BLK_H
#ifdef CONFIG_SYS_64BIT_LBA
typedef uint64_t lbaint_t;
#define LBAFlength "ll"
#else
typedef ulong lbaint_t;
#define LBAFlength "l"
#endif
#define LBAF "%" LBAFlength "x"
#define LBAFU "%" LBAFlength "u"
/* Interface types: */
enum if_type {
IF_TYPE_UNKNOWN = 0,
IF_TYPE_IDE,
IF_TYPE_SCSI,
IF_TYPE_ATAPI,
IF_TYPE_USB,
IF_TYPE_DOC,
IF_TYPE_MMC,
IF_TYPE_SD,
IF_TYPE_SATA,
IF_TYPE_HOST,
IF_TYPE_NVME,
IF_TYPE_EFI,
IF_TYPE_VIRTIO,
IF_TYPE_COUNT, /* Number of interface types */
};
#define BLK_VEN_SIZE 40
#define BLK_PRD_SIZE 20
#define BLK_REV_SIZE 8
/*
* Identifies the partition table type (ie. MBR vs GPT GUID) signature
*/
enum sig_type {
SIG_TYPE_NONE,
SIG_TYPE_MBR,
SIG_TYPE_GUID,
SIG_TYPE_COUNT /* Number of signature types */
};
typedef struct {
u8 b[16];
} efi_guid_t __attribute__((aligned(8)));
/*
* With driver model (CONFIG_BLK) this is uclass platform data, accessible
* with dev_get_uclass_platdata(dev)
*/
struct blk_desc {
/*
* TODO: With driver model we should be able to use the parent
* device's uclass instead.
*/
enum if_type if_type; /* type of the interface */
int devnum; /* device number */
unsigned char part_type; /* partition type */
unsigned char target; /* target SCSI ID */
unsigned char lun; /* target LUN */
unsigned char hwpart; /* HW partition, e.g. for eMMC */
unsigned char type; /* device type */
unsigned char removable; /* removable device */
#ifdef CONFIG_LBA48
/* device can use 48bit addr (ATA/ATAPI v7) */
unsigned char lba48;
#endif
lbaint_t lba; /* number of blocks */
unsigned long blksz; /* block size */
int log2blksz; /* for convenience: log2(blksz) */
char vendor[BLK_VEN_SIZE + 1]; /* device vendor string */
char product[BLK_PRD_SIZE + 1]; /* device product number */
char revision[BLK_REV_SIZE + 1]; /* firmware revision */
enum sig_type sig_type; /* Partition table signature type */
union {
uint32_t mbr_sig; /* MBR integer signature */
efi_guid_t guid_sig; /* GPT GUID Signature */
};
unsigned long (*block_read)(struct blk_desc *block_dev,
lbaint_t start,
lbaint_t blkcnt,
void *buffer);
unsigned long (*block_write)(struct blk_desc *block_dev,
lbaint_t start,
lbaint_t blkcnt,
const void *buffer);
unsigned long (*block_erase)(struct blk_desc *block_dev,
lbaint_t start,
lbaint_t blkcnt);
void *priv; /* driver private struct pointer */
};
#endif
......@@ -176,7 +176,7 @@ static int handshake(uint32_t *ptr, uint32_t mask, uint32_t done, int usec)
uint32_t result;
do {
result = ehci_readl(ptr);
udelay(5); // FIXME
udelay(5);
if (result == ~(uint32_t)0)
return -1;
result &= mask;
......@@ -256,7 +256,7 @@ static int ehci_td_buffer(struct qTD *td, void *buf, size_t sz)
int idx;
if (addr != ALIGN(addr, ARCH_DMA_MINALIGN))
printf("EHCI-HCD: Misaligned buffer address (%p)\n", buf);
printf("EHCI-HCD: Misaligned buffer address (%p vs %x)\n", buf, ALIGN(addr, ARCH_DMA_MINALIGN));
flush_dcache_range(addr, ALIGN(addr + sz, ARCH_DMA_MINALIGN));
......@@ -326,8 +326,8 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer,
int ret = 0;
struct ehci_ctrl *ctrl = ehci_get_ctrl(dev);
printf("dev=%p, pipe=%lx, buffer=%p, length=%d, req=%p\n", dev, pipe,
buffer, length, req);
//printf("dev=%p, pipe=%lx, buffer=%p, length=%d, req=%p\n", dev, pipe,
// buffer, length, req);
/*if (req != NULL)
printf("req=%u (%#x), type=%u (%#x), value=%u (%#x), index=%u\n",
req->request, req->request,
......@@ -397,7 +397,7 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer,
// FIXME needs 128kB ram?
qtd = memalign(USB_DMA_MINALIGN, qtd_count * sizeof(struct qTD));
qtd = memalign(USB_DMA_MINALIGN, qtd_count * sizeof(struct qTD)); // FIXME dynamic allocation
if (qtd == NULL) {
printf("unable to allocate TDs\n");
return -1;
......@@ -635,7 +635,7 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer,
token = hc32_to_cpu(qh->qh_overlay.qt_token);
if (!(QT_TOKEN_GET_STATUS(token) & QT_TOKEN_STATUS_ACTIVE)) {
printf("TOKEN=%#lx\n", token);
//printf("TOKEN=%#lx\n", token);
switch (QT_TOKEN_GET_STATUS(token) &
~(QT_TOKEN_STATUS_SPLITXSTATE | QT_TOKEN_STATUS_PERR)) {
case 0:
......@@ -664,12 +664,10 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer,
dev->act_len = length - QT_TOKEN_GET_TOTALBYTES(token);
} else {
dev->act_len = 0;
#ifndef CONFIG_USB_EHCI_FARADAY
printf("dev=%u, usbsts=%#lx, p[1]=%#lx, p[2]=%#lx\n",
dev->devnum, ehci_readl(&ctrl->hcor->or_usbsts),
ehci_readl(&ctrl->hcor->or_portsc[0]),
ehci_readl(&ctrl->hcor->or_portsc[1]));
#endif
//printf("dev=%u, usbsts=%#lx, p[1]=%#lx, p[2]=%#lx\n",
// dev->devnum, ehci_readl(&ctrl->hcor->or_usbsts),
// ehci_readl(&ctrl->hcor->or_portsc[0]),
// ehci_readl(&ctrl->hcor->or_portsc[1]));
}
free(qtd);
......@@ -718,19 +716,19 @@ static int ehci_submit_root(struct usb_device *dev, unsigned long pipe,
case DeviceRequest | USB_REQ_GET_DESCRIPTOR:
switch (le16_to_cpu(req->value) >> 8) {
case USB_DT_DEVICE:
printf("USB_DT_DEVICE request\n");
//printf("USB_DT_DEVICE request\n");
srcptr = &descriptor.device;
srclen = descriptor.device.bLength;
break;
case USB_DT_CONFIG:
printf("USB_DT_CONFIG config\n");
//printf("USB_DT_CONFIG config\n");
srcptr = &descriptor.config;
srclen = descriptor.config.bLength +
descriptor.interface.bLength +
descriptor.endpoint.bLength;
break;
case USB_DT_STRING:
printf("USB_DT_STRING config\n");
//printf("USB_DT_STRING config\n");
switch (le16_to_cpu(req->value) & 0xff) {
case 0: /* Language */
srcptr = "\4\3\1\0";
......@@ -760,7 +758,7 @@ static int ehci_submit_root(struct usb_device *dev, unsigned long pipe,
case USB_REQ_GET_DESCRIPTOR | ((USB_DIR_IN | USB_RT_HUB) << 8):
switch (le16_to_cpu(req->value) >> 8) {
case USB_DT_HUB:
printf("USB_DT_HUB config\n");
//printf("[ehci] USB_DT_HUB config\n");
srcptr = &descriptor.hub;
srclen = descriptor.hub.bLength;
break;
......@@ -770,11 +768,11 @@ static int ehci_submit_root(struct usb_device *dev, unsigned long pipe,
}
break;
case USB_REQ_SET_ADDRESS | (USB_RECIP_DEVICE << 8):
printf("USB_REQ_SET_ADDRESS\n");
//printf("USB_REQ_SET_ADDRESS\n");
ctrl->rootdev = le16_to_cpu(req->value);
break;
case DeviceOutRequest | USB_REQ_SET_CONFIGURATION:
printf("USB_REQ_SET_CONFIGURATION\n");
//printf("USB_REQ_SET_CONFIGURATION\n");
/* Nothing to do */
break;
case USB_REQ_GET_STATUS | ((USB_DIR_IN | USB_RT_HUB) << 8):
......@@ -947,8 +945,8 @@ static int ehci_submit_root(struct usb_device *dev, unsigned long pipe,
len = min3(srclen, (int)le16_to_cpu(req->length), length);
if (srcptr != NULL && len > 0)
memcpy(buffer, srcptr, len);
else
printf("[ehci] Len is 0\n");
//else
// printf("[ehci] Len is 0\n");
dev->act_len = len;
dev->status = 0;
......@@ -1056,10 +1054,12 @@ static int ehci_common_init(struct ehci_ctrl *ctrl, unsigned int tweaks)
* S-mask and C-mask.
*/
if (ctrl->periodic_list == NULL)
ctrl->periodic_list = memalign(4096, 1024 * 4);
ctrl->periodic_list = memalign(4096, 1024 * 4); // FIXME dynamic allocation
if (!ctrl->periodic_list)
if (!ctrl->periodic_list) {
printf("[ehci_common_init] ENOMEM\n");
return -ENOMEM;
}
for (i = 0; i < 1024; i++) {
ctrl->periodic_list[i] = cpu_to_hc32((unsigned long)periodic
| QH_LINK_TYPE_QH);
......@@ -1293,7 +1293,7 @@ static struct int_queue *_ehci_create_int_queue(struct usb_device *dev,
return NULL;
}
result = malloc(sizeof(*result));
result = malloc(sizeof(*result)); // FIXME dynamic allocation
if (!result) {
printf("ehci intr queue: out of memory\n");
goto fail1;
......@@ -1301,7 +1301,7 @@ static struct int_queue *_ehci_create_int_queue(struct usb_device *dev,
result->elementsize = elementsize;
result->pipe = pipe;
result->first = memalign(USB_DMA_MINALIGN,
sizeof(struct QH) * queuesize);
sizeof(struct QH) * queuesize); // FIXME dynamic allocation
if (!result->first) {
printf("ehci intr queue: out of memory\n");
goto fail2;
......@@ -1309,7 +1309,7 @@ static struct int_queue *_ehci_create_int_queue(struct usb_device *dev,
result->current = result->first;
result->last = result->first + queuesize - 1;
result->tds = memalign(USB_DMA_MINALIGN,
sizeof(struct qTD) * queuesize);
sizeof(struct qTD) * queuesize); // FIXME dynamic allocation
if (!result->tds) {
printf("ehci intr queue: out of memory\n");
goto fail3;
......@@ -1513,8 +1513,8 @@ static int _ehci_submit_int_msg(struct usb_device *dev, unsigned long pipe,
unsigned long timeout;
int result = 0, ret;
printf("dev=%p, pipe=%lu, buffer=%p, length=%d, interval=%d",
dev, pipe, buffer, length, interval);
//printf("dev=%p, pipe=%lu, buffer=%p, length=%d, interval=%d",
// dev, pipe, buffer, length, interval);
queue = _ehci_create_int_queue(dev, pipe, 1, length, buffer, interval);
if (!queue)
......
......@@ -53,7 +53,7 @@ int ehci_zynq_probe(struct zynq_ehci_priv *priv)
hccr = (struct ehci_hccr *)((uint32_t)&priv->ehci->caplength);
hcor = (struct ehci_hcor *)((uint32_t) hccr + HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
printf("[ehci-zynq] hccr: %p hcor: %p\n", hccr, hcor);
//printf("[ehci-zynq] hccr: %p hcor: %p\n", hccr, hcor);
priv->ehcictrl.hccr = hccr;