This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: at91 cdl refactoring , settable baudrate from redboot
Andrew Lunn <andrew@lunn.ch> writes:
> From what i can gather all these devices are normally run at the
> same speed.
Yes, at least the Atmel eval boards do.
> So i think i would put the clock rate into the variant. But i would
> set it using a default_value.
>
> If some platform is running the clock at a different rate, all it
> then needs to do in the platform HAL is put in a requires statement.
This is fine with me. I've attached a new patch below.
Regards,
--Daniel
Index: hal/arm/at91/var/current/ChangeLog
===================================================================
RCS file: /home/dne/cvsroot/redhat/ecos/packages/hal/arm/at91/var/current/ChangeLog,v
retrieving revision 1.1.1.10
retrieving revision 1.19
diff -p -U5 -r1.1.1.10 -r1.19
--- hal/arm/at91/var/current/ChangeLog 2004/02/17 15:41:02 1.1.1.10
+++ hal/arm/at91/var/current/ChangeLog 2004/02/18 15:24:28 1.19
@@ -1,5 +1,15 @@
+2004-02-18 Daniel Néri <daniel.neri@sigicom.se>
+
+ * cdl/hal_arm_at91.cdl: Don't define
+ CYGNUM_HAL_ARM_AT91_CLOCK_SPEED as "calculated", so it can be
+ overridden in the platform HAL.
+
+ * src/hal_diag.c (cyg_hal_plf_serial_control): Properly terminate
+ variable argument processing.
+ (hal_diag_led): Avoid compiler warning for undeclared function.
+
2004-02-12 Jani Monoses <jani@iv.ro>
* cdl/hal_arm_at91.cdl: Put configuration options common to all
variants here. Replace
CYGNUM_HAL_VIRTUAL_VECTOR_CHANNELS_DEFAULT_BAUD with the two
Index: hal/arm/at91/var/current/cdl/hal_arm_at91.cdl
===================================================================
RCS file: /home/dne/cvsroot/redhat/ecos/packages/hal/arm/at91/var/current/cdl/hal_arm_at91.cdl,v
retrieving revision 1.1.1.4
retrieving revision 1.8
diff -p -U5 -r1.1.1.4 -r1.8
--- hal/arm/at91/var/current/cdl/hal_arm_at91.cdl 2004/02/17 15:41:02 1.1.1.4
+++ hal/arm/at91/var/current/cdl/hal_arm_at91.cdl 2004/02/18 15:24:28 1.8
@@ -126,11 +126,11 @@ cdl_package CYGPKG_HAL_ARM_AT91 {
# Real-time clock/counter specifics
cdl_option CYGNUM_HAL_ARM_AT91_CLOCK_SPEED {
display "CPU clock speed"
flavor data
- calculated {CYGHWR_HAL_ARM_AT91 == "R40008" ? 66000000: 32768000}
+ default_value {CYGHWR_HAL_ARM_AT91 == "R40008" ? 66000000 : 32768000}
}
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
display "Number of communication channels on the board"
flavor data
Index: hal/arm/at91/var/current/src/hal_diag.c
===================================================================
RCS file: /home/dne/cvsroot/redhat/ecos/packages/hal/arm/at91/var/current/src/hal_diag.c,v
retrieving revision 1.1.1.2
retrieving revision 1.5
diff -p -U5 -r1.1.1.2 -r1.5
--- hal/arm/at91/var/current/src/hal_diag.c 2004/02/17 15:41:02 1.1.1.2
+++ hal/arm/at91/var/current/src/hal_diag.c 2004/02/18 12:31:04 1.5
@@ -227,23 +227,17 @@ cyg_hal_plf_serial_control(void *__ch_da
break;
case __COMMCTL_DBG_ISR_VECTOR:
ret = chan->isr_vector;
break;
case __COMMCTL_SET_TIMEOUT:
- {
- va_list ap;
-
- va_start(ap, __func);
-
ret = chan->msec_timeout;
chan->msec_timeout = va_arg(ap, cyg_uint32);
-
- va_end(ap);
- }
default:
break;
}
+
+ va_end(ap);
CYGARC_HAL_RESTORE_GP();
return ret;
}
static int
@@ -340,10 +334,12 @@ cyg_hal_plf_comms_init(void)
}
void
hal_diag_led(int mask)
{
+ extern void hal_at91_set_leds(int);
+
hal_at91_set_leds(mask);
}
//-----------------------------------------------------------------------------
// End of hal_diag.c