* lan8710a_dma_config_tx *
*============================================================================*/
static void
-lan8710a_dma_config_tx(desc_idx)
-u8_t desc_idx;
+lan8710a_dma_config_tx(u8_t desc_idx)
{
phys_bytes phys_addr;
int i;
write32(mmchs->io_base + reg, value);
}
-int
+void
mmchs_set_bus_freq(u32_t freq)
{
u32_t freq_in = HSMMCSD_0_IN_FREQ;
}
}
-int
+void
mmc_switch(int function, int value, uint8_t * data)
{
struct mmc_command command;
command.args |= (value << fshift);
if (mmc_send_cmd(&command)) {
log_warn(&log, "Failed to set device in high speed mode\n");
- return 1;
+ return;
}
// dump(data,64);
}
"for 'hub port LS attach' event");
USB_MSG("Low speed device connected at "
- "hub 0x%08X, port %u", device, val);
+ "hub 0x%p, port %u", device, val);
hcd_add_child(device, val, HCD_SPEED_LOW);
break;
"for 'hub port FS attach' event");
USB_MSG("Full speed device connected at "
- "hub 0x%08X, port %u", device, val);
+ "hub 0x%p, port %u", device, val);
hcd_add_child(device, val, HCD_SPEED_FULL);
break;
"for 'hub port HS attach' event");
USB_MSG("High speed device connected at "
- "hub 0x%08X, port %u", device, val);
+ "hub 0x%p, port %u", device, val);
hcd_add_child(device, val, HCD_SPEED_HIGH);
break;
hcd_delete_child(device, val);
USB_MSG("Device disconnected from "
- "hub 0x%08X, port %u", device, val);
+ "hub 0x%p, port %u", device, val);
break;
/* DEBUG_DUMP; */ /* Let's keep tree output cleaner */
- USB_MSG("Device on level %03u: 0x%08X", level, device);
+ USB_MSG("Device on level %03u: 0x%p", level, device);
/* Traverse device tree recursively */
for (child_num = 0; child_num < HCD_CHILDREN; child_num++) {
connect_cb = drv->connect;
disconnect_cb = drv->disconnect;
- *_m = malloc;
- *_f = free;
+ *_m = (ddekit_usb_malloc_fn) malloc;
+ *_f = (ddekit_usb_free_fn) free;
return EXIT_SUCCESS;
}
/* For now we only allow to play with the yoffset setting */
if (fbvsp->yoffset != omap_fbvs[minor].yoffset) {
- if (fbvsp->yoffset < 0 || fbvsp->yoffset > omap_fbvs[minor].yres) {
+ if (/* fbvsp->yoffset < 0 || */ fbvsp->yoffset > omap_fbvs[minor].yres) {
return EINVAL;
}
strcmp.o strcpy.o strlen.o strncmp.o \
memcpy.o memmove.o memset.o \
udivdi3.o umoddi3.o qdivrem.o
-MINC_OBJS_UNPAGED+= __aeabi_ldiv0.o __aeabi_idiv0.o __aeabi_uldivmod.o divide.o divsi3.o udivsi3.o
+MINC_OBJS_UNPAGED+= __aeabi_ldiv0.o __aeabi_idiv0.o __aeabi_uldivmod.o divide.o divsi3.o udivsi3.o umodsi3.o
atoi.o: ${NETBSDSRCDIR}/minix/lib/libminc/atoi.c
printf.o: ${NETBSDSRCDIR}/sys/lib/libsa/printf.c
subr_prf.o: ${NETBSDSRCDIR}/sys/lib/libsa/subr_prf.c
divide.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/gen/divide.S
divsi3.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/gen/divsi3.S
udivsi3.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/gen/udivsi3.S
+umodsi3.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/gen/umodsi3.S
# the following is required by pre_init.c
strncmp.o: ${NETBSDSRCDIR}/common/lib/libc/string/strncmp.c
#include "hw_intr.h"
#include "bsp_intr.h"
-int hw_intr_mask(int irq){
+void hw_intr_mask(int irq){
bsp_irq_mask(irq);
}
-int hw_intr_unmask(int irq){
+void hw_intr_unmask(int irq){
bsp_irq_unmask(irq);
}
-int hw_intr_ack(int irq){};
-int hw_intr_used(int irq){};
-int hw_intr_not_used(int irq){};
-int hw_intr_disable_all(){};
+void hw_intr_ack(int irq){};
+void hw_intr_used(int irq){};
+void hw_intr_not_used(int irq){};
+void hw_intr_disable_all(){};
#include "kernel/kernel.h"
void irq_handle(int irq);
-int hw_intr_mask(int irq);
-int hw_intr_unmask(int irq);
-int hw_intr_ack(int irq);
-int hw_intr_used(int irq);
-int hw_intr_not_used(int irq);
-int hw_intr_disable_all();
+void hw_intr_mask(int irq);
+void hw_intr_unmask(int irq);
+void hw_intr_ack(int irq);
+void hw_intr_used(int irq);
+void hw_intr_not_used(int irq);
+void hw_intr_disable_all();
#endif /* __HW_INTR_ARM_H__ */
void busy_delay_ms(int x) { }
int raise(int n) { panic("raise(%d)\n", n); }
int kern_phys_map_ptr( phys_bytes base_address, vir_bytes io_size, int vm_flags,
-struct kern_phys_map * priv, vir_bytes ptr) {};
+struct kern_phys_map * priv, vir_bytes ptr) { return -1; };
struct machine machine; /* pre init stage machine */
#define ASCOMPLAIN(caller, entry, field) \
printf("kernel:%s:%d: asyn failed for %s in %s " \
- "(%d/%d, tab 0x%lx)\n",__FILE__,__LINE__, \
+ "(%d/%zu, tab 0x%lx)\n",__FILE__,__LINE__, \
field, caller->p_name, entry, priv(caller)->s_asynsize, priv(caller)->s_asyntab)
#define A_RETR_FLD(entry, field) \
WARNS=
+NOCLANGERROR=yes
+
DPADD+= ${LIBCHARDRIVER} ${LIBSYS}
LDADD+= -lchardriver -lsys
}
if (acc->acc_offset + acc->acc_length > buffer->buf_size)
{
- printf("%d + %d > %d for buffer %p, and acc %p\n",
+ printf("%d + %d > %zu for buffer %p, and acc %p\n",
acc->acc_offset, acc->acc_length,
buffer->buf_size, buffer, acc);
return 0;
}
else if (!curr_time)
{
- DBLOCK(0x20, printf("set_time: new time %lu < prev_time %lu\n",
+ DBLOCK(0x20, printf("set_time: new time %u < prev_time %u\n",
tim, prev_time));
}
}
#endif
#ifndef BUF_TRACK_ALLOC_FREE
-acc_t *bf_memreq ARGS(( unsigned size));
+acc_t *bf_memreq ARGS(( size_t size));
#else
acc_t *_bf_memreq ARGS(( char *clnt_file, int clnt_line,
- unsigned size));
+ size_t size));
#endif
/* the result is an acc with linkC == 1 */
printf("%-10s %12s\n", "STR", (char*) p->u.mem.data);
break;
case DSF_TYPE_MEM:
- printf("%-10s %12u\n", "MEM", p->u.mem.length);
+ printf("%-10s %12zu\n", "MEM", p->u.mem.length);
break;
case DSF_TYPE_LABEL:
printf("%-10s %12u\n", "LABEL", p->u.u32);
if((r= sys_datacopy(SELF, ((vir_bytes)execi->hdr)+off,
execi->proc_e, seg_addr, seg_bytes)) != OK) {
printf("RS: exec read_seg: copy 0x%x bytes into %i at 0x%08lx failed: %i\n",
- seg_bytes, execi->proc_e, seg_addr, r);
+ (int) seg_bytes, execi->proc_e, seg_addr, r);
}
return r;
}
rp->r_exec= malloc(rp->r_exec_len);
if (rp->r_exec == NULL)
{
- printf("RS: read_exec: unable to allocate %d bytes\n",
+ printf("RS: read_exec: unable to allocate %zu bytes\n",
rp->r_exec_len);
close(fd);
return ENOMEM;
{
printf(
"rs:get_next_name: bad ipc list entry '%.*s' for %s: too long\n",
- len, p, caller_label);
+ (int) len, p, caller_label);
continue;
}
memcpy(name, p, len);
if (label != NULL) {
len = strlen(label);
if (len+1 > sizeof(dp->dmap_label)) {
- printf("VFS: map_driver: label too long: %d\n", len);
+ printf("VFS: map_driver: label too long: %zu\n", len);
return(EINVAL);
}
strlcpy(dp->dmap_label, label, sizeof(dp->dmap_label));
int n, r;
off_t pos, new_pos;
char *sp, *interp = NULL;
- unsigned int cum_io;
+ size_t cum_io;
char buf[PAGE_SIZE];
/* Make 'path' the new argv[0]. */
/* The stack will grow (or shrink) by offset bytes. */
if ((*stk_bytes += offset) > ARG_MAX) {
- printf("vfs:: offset too big!! %d (max %d)\n", *stk_bytes,
+ printf("vfs:: offset too big!! %zu (max %d)\n", *stk_bytes,
ARG_MAX);
return FALSE;
}
*/
int r;
off_t new_pos;
- unsigned int cum_io;
+ size_t cum_io;
struct vnode *vp = ((struct vfs_exec_info *) execi->opaque)->vp;
/* Make sure that the file is big enough */
static int map_header(struct vfs_exec_info *execi)
{
int r;
- unsigned int cum_io;
+ size_t cum_io;
off_t pos, new_pos;
static char hdr[PAGE_SIZE]; /* Assume that header is not larger than a page */
/* request.c */
int req_breadwrite(endpoint_t fs_e, endpoint_t user_e, dev_t dev, off_t pos,
unsigned int num_of_bytes, vir_bytes user_addr, int rw_flag,
- off_t *new_posp, unsigned int *cum_iop);
+ off_t *new_posp, size_t *cum_iop);
int req_chmod(endpoint_t fs_e, ino_t inode_nr, mode_t rmode,
mode_t *new_modep);
int req_chown(endpoint_t fs_e, ino_t inode_nr, uid_t newuid, gid_t newgid,
int isroot, struct node_details *res_nodep, unsigned int *fs_flags);
int req_readwrite(endpoint_t fs_e, ino_t inode_nr, off_t pos, int rw_flag,
endpoint_t user_e, vir_bytes user_addr, unsigned int num_of_bytes,
- off_t *new_posp, unsigned int *cum_iop);
+ off_t *new_posp, size_t *cum_iop);
int req_bpeek(endpoint_t fs_e, dev_t dev, off_t pos, unsigned int num_of_bytes);
int req_peek(endpoint_t fs_e, ino_t inode_nr, off_t pos, unsigned int bytes);
int req_rename(endpoint_t fs_e, ino_t old_dir, char *old_name, ino_t new_dir,
{
register struct vnode *vp;
off_t position, res_pos;
- unsigned int cum_io, cum_io_incr, res_cum_io;
+ size_t cum_io, res_cum_io;
+ size_t cum_io_incr;
int op, r;
dev_t dev;
size_t req_size;
{
int r, oflags, partial_pipe = 0;
- size_t size, cum_io, cum_io_incr;
+ size_t size, cum_io;
+ size_t cum_io_incr;
struct vnode *vp;
off_t position, new_pos;
*===========================================================================*/
static int req_breadwrite_actual(endpoint_t fs_e, endpoint_t user_e, dev_t dev, off_t pos,
unsigned int num_of_bytes, vir_bytes user_addr, int rw_flag,
- off_t *new_pos, unsigned int *cum_iop, int cpflag)
+ off_t *new_pos, size_t *cum_iop, int cpflag)
{
int r;
cp_grant_id_t grant_id;
int req_breadwrite(endpoint_t fs_e, endpoint_t user_e, dev_t dev, off_t pos,
unsigned int num_of_bytes, vir_bytes user_addr, int rw_flag,
- off_t *new_pos, unsigned int *cum_iop)
+ off_t *new_pos, size_t *cum_iop)
{
int r;
*===========================================================================*/
int req_readwrite(endpoint_t fs_e, ino_t inode_nr, off_t pos,
int rw_flag, endpoint_t user_e, vir_bytes user_addr,
- unsigned int num_of_bytes, off_t *new_posp, unsigned int *cum_iop)
+ unsigned int num_of_bytes, off_t *new_posp, size_t *cum_iop)
{
int r;
mem_type_t *mt = NULL;
if(m->m_mmap.fd != -1) {
- printf("VM: mmap: fd %d, len 0x%x\n", m->m_mmap.fd, len);
+ printf("VM: mmap: fd %d, len 0x%zx\n", m->m_mmap.fd, len);
return EINVAL;
}
MAP_PREALLOC | MAP_ANON, -1, 0);
if (ptr == MAP_FAILED)
- panic("unable to allocate %d bytes of memory", size);
+ panic("unable to allocate %zu bytes of memory", size);
return ptr;
}
put_value(proc, "semid", "%d", m_out->m_lc_ipc_semop.id);
put_sembuf_array(proc, "sops", (vir_bytes)m_out->m_lc_ipc_semop.ops,
m_out->m_lc_ipc_semop.size);
- put_value(proc, "nsops", "%zu", m_out->m_lc_ipc_semop.size);
+ put_value(proc, "nsops", "%u", m_out->m_lc_ipc_semop.size);
return CT_DONE;
}
put_buf(proc, "value", PF_STRING, m_out->m_lc_pm_sysuname.value,
m_out->m_lc_pm_sysuname.len);
- put_value(proc, "len", "%d", m_out->m_lc_pm_sysuname.len);
+ put_value(proc, "len", "%zu", m_out->m_lc_pm_sysuname.len);
return CT_DONE;
}
if (m_out->m_lc_pm_sysuname.req == _UTS_GET) {
put_buf(proc, "value", failed | PF_STRING,
m_out->m_lc_pm_sysuname.value, m_in->m_type);
- put_value(proc, "len", "%d", m_out->m_lc_pm_sysuname.len);
+ put_value(proc, "len", "%zu", m_out->m_lc_pm_sysuname.len);
put_equals(proc);
}
put_result(proc);