Patchwork [4/6,RFC] Header file for the GRLIB components.

login
register
mail settings
Submitter Fabien Chouteau
Date Dec. 6, 2010, 9:26 a.m.
Message ID <3ecbaf8fc01bebd2b2f2fb2c709642b2a1db7ff0.1291397462.git.chouteau@adacore.com>
Download mbox | patch
Permalink /patch/74326/
State New
Headers show

Comments

Fabien Chouteau - Dec. 6, 2010, 9:26 a.m.
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
---
 hw/grlib.h |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)
Blue Swirl - Dec. 6, 2010, 5:31 p.m.
On Mon, Dec 6, 2010 at 9:26 AM, Fabien Chouteau <chouteau@adacore.com> wrote:
>
> Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
> ---
>  hw/grlib.h |   27 +++++++++++++++++++++++++++
>  1 files changed, 27 insertions(+), 0 deletions(-)
>
> diff --git a/hw/grlib.h b/hw/grlib.h
> new file mode 100644
> index 0000000..eab7974
> --- /dev/null
> +++ b/hw/grlib.h
> @@ -0,0 +1,27 @@
> +#ifndef _GRLIB_H_
> +#define _GRLIB_H_
> +
> +#include "qdev.h"
> +
> +/* IRQMP */
> +
> +DeviceState *grlib_irqmp_create(target_phys_addr_t   base,
> +                                CPUState            *env,
> +                                qemu_irq           **cpu_irqs,
> +                                uint32_t             nr_irqs);
> +
> +/* GPTimer */
> +
> +DeviceState *grlib_gptimer_create(target_phys_addr_t  base,
> +                                  uint32_t            nr_timers,
> +                                  uint32_t            freq,
> +                                  qemu_irq           *cpu_irqs,
> +                                  int                 base_irq);
> +
> +/* APB UART */
> +
> +DeviceState *grlib_apbuart_create(target_phys_addr_t  base,
> +                                  CharDriverState    *serial,
> +                                  qemu_irq            irq);
> +

The file should not be needed when you move the functions to leon3.c.

By the way, the patch series is now broken because earlier patches in
the series needed this file. This would break bisection which is bad.
Fabien Chouteau - Dec. 7, 2010, 11:04 a.m.
On 12/06/2010 06:31 PM, Blue Swirl wrote:
> On Mon, Dec 6, 2010 at 9:26 AM, Fabien Chouteau<chouteau@adacore.com>  wrote:
>>
>> Signed-off-by: Fabien Chouteau<chouteau@adacore.com>
>> ---
>>   hw/grlib.h |   27 +++++++++++++++++++++++++++
>>   1 files changed, 27 insertions(+), 0 deletions(-)
>>
>> diff --git a/hw/grlib.h b/hw/grlib.h
>> new file mode 100644
>> index 0000000..eab7974
>> --- /dev/null
>> +++ b/hw/grlib.h
>> @@ -0,0 +1,27 @@
>> +#ifndef _GRLIB_H_
>> +#define _GRLIB_H_
>> +
>> +#include "qdev.h"
>> +
>> +/* IRQMP */
>> +
>> +DeviceState *grlib_irqmp_create(target_phys_addr_t   base,
>> +                                CPUState            *env,
>> +                                qemu_irq           **cpu_irqs,
>> +                                uint32_t             nr_irqs);
>> +
>> +/* GPTimer */
>> +
>> +DeviceState *grlib_gptimer_create(target_phys_addr_t  base,
>> +                                  uint32_t            nr_timers,
>> +                                  uint32_t            freq,
>> +                                  qemu_irq           *cpu_irqs,
>> +                                  int                 base_irq);
>> +
>> +/* APB UART */
>> +
>> +DeviceState *grlib_apbuart_create(target_phys_addr_t  base,
>> +                                  CharDriverState    *serial,
>> +                                  qemu_irq            irq);
>> +
>
> The file should not be needed when you move the functions to leon3.c.

These functions can be used to create more machines with GrLib 
components, that's why they are implemented in the grlib_* files.

Patch

diff --git a/hw/grlib.h b/hw/grlib.h
new file mode 100644
index 0000000..eab7974
--- /dev/null
+++ b/hw/grlib.h
@@ -0,0 +1,27 @@ 
+#ifndef _GRLIB_H_
+#define _GRLIB_H_
+
+#include "qdev.h"
+
+/* IRQMP */
+
+DeviceState *grlib_irqmp_create(target_phys_addr_t   base,
+                                CPUState            *env,
+                                qemu_irq           **cpu_irqs,
+                                uint32_t             nr_irqs);
+
+/* GPTimer */
+
+DeviceState *grlib_gptimer_create(target_phys_addr_t  base,
+                                  uint32_t            nr_timers,
+                                  uint32_t            freq,
+                                  qemu_irq           *cpu_irqs,
+                                  int                 base_irq);
+
+/* APB UART */
+
+DeviceState *grlib_apbuart_create(target_phys_addr_t  base,
+                                  CharDriverState    *serial,
+                                  qemu_irq            irq);
+
+#endif /* ! _GRLIB_H_ */