qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Sanders <vince@kyllikki.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 2/16] Add s3c SOC header
Date: Thu, 23 Apr 2009 18:48:04 +0100	[thread overview]
Message-ID: <20090423174804.GE4629@derik> (raw)
In-Reply-To: <20090423171503.GC4629@derik>

S3C SOC integrated peripheral devices structure

Signed-off-by: Vincent Sanders <vince@simtec.co.uk>
---
 s3c24xx.h |   73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)


diff -urN qemusvnclean/hw/s3c24xx.h qemusvnpatches/hw/s3c24xx.h
--- qemusvnclean/hw/s3c24xx.h	1970-01-01 01:00:00.000000000 +0100
+++ qemusvnpatches/hw/s3c24xx.h	2009-04-23 15:53:57.000000000 +0100
@@ -0,0 +1,73 @@
+/* hw/s3c24xx.h
+ *
+ * Samsung s3c24xx cpu state and functions.
+ *
+ * Copyright 2006, 2007, 2008 Daniel Silverstone and Vincent Sanders
+ *
+ * This file is under the terms of the GNU General Public
+ * License Version 2.
+ */
+
+#ifndef S3C24XX_H
+#define S3C24XX_H 1
+
+/* This structure type encapsulates the state of a S3C24XX SoC. */
+typedef struct S3CState_s {
+    CPUState *cpu_env;
+    qemu_irq *irqs;
+    qemu_irq *eirqs;
+
+    /* Memory controller */
+    uint32_t memc_reg[13];
+
+    /* Interrupt controller */
+    uint32_t irq_main_level, irq_subsrc_level;
+    uint32_t irq_reg[8];
+
+    /* Clock controller */
+    uint32_t clkcon_reg[6];
+
+    uint32_t tclk0; /* first timer clock source frequency */
+    uint32_t tclk1; /* second timer clock source frequency */
+
+    /* GPIO block */
+    uint32_t gpio_reg[47];
+
+    /* Realtime clock */
+    uint8_t rtc_reg[19];
+
+    /* i2c */
+    struct s3c24xx_i2c_state_s *iic;
+    
+    /* Timers, (Specifically timer4) */
+    uint32_t timers_reg[17];
+    QEMUTimer *timer4;
+    uint32_t timer4_reload_value;
+    int64_t timer4_last_ticked;
+
+    /* LCD controller */
+    struct s3c24xx_lcd_state_s *lcd;
+
+    /* NAND controller, and chip attached */
+    uint32_t nand_reg[5];
+    struct nand_flash_s *nand_chip;
+} S3CState;
+
+/* Internal functions for s3c24xx implementation */
+void s3c24xx_memc_init(S3CState *soc, target_phys_addr_t base_addr);
+qemu_irq *s3c24xx_irq_init(S3CState *soc, target_phys_addr_t base_addr);
+void s3c24xx_clkcon_init(S3CState *soc, target_phys_addr_t base_addr);
+void s3c24xx_timers_init(S3CState *soc, target_phys_addr_t base_addr);
+void s3c24xx_serial_init(S3CState *soc, int port, target_phys_addr_t base_addr);
+void s3c24xx_rtc_init(S3CState *soc, target_phys_addr_t base_addr);
+void s3c24xx_gpio_init(S3CState *soc, target_phys_addr_t base_addr,uint32_t cpu_id );
+void s3c24xx_iic_init(S3CState *soc, target_phys_addr_t base_addr);
+struct s3c24xx_lcd_state_s *s3c24xx_lcd_init(target_phys_addr_t base, qemu_irq irq);
+void s3c24xx_nand_init(S3CState *soc, target_phys_addr_t base_addr);
+
+/* attach a NAND device to the s3c24xx controller */
+void s3c24xx_nand_attach(S3CState *soc, struct nand_flash_s *nand_chip);
+
+i2c_bus *s3c24xx_i2c_bus(struct s3c24xx_i2c_state_s *s);
+
+#endif /* S3C24XX_H */

-- 
Regards Vincent
http://www.kyllikki.org/

  parent reply	other threads:[~2009-04-23 17:48 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-23 17:15 [Qemu-devel] [PATCH 0/16] ARM Add S3C SOC core, drivers and boards Vincent Sanders
2009-04-23 17:45 ` [Qemu-devel] [PATCH 1/16] ARM Add ARM 920T identifiers Vincent Sanders
2009-04-30 16:08   ` Paul Brook
2009-05-23 16:50     ` Vincent Sanders
2009-05-24 18:31       ` Paul Brook
2009-05-26  9:39         ` Vincent Sanders
2009-05-26  9:42           ` Laurent Desnogues
2009-05-26  9:56             ` Jamie Lokier
2009-05-26 10:08               ` Laurent Desnogues
2009-05-26 11:29                 ` Jamie Lokier
2009-05-26 11:46                   ` Laurent Desnogues
2009-05-26 10:16               ` Paul Brook
2009-05-26 11:18                 ` Vincent Sanders
2009-04-23 17:48 ` Vincent Sanders [this message]
2009-04-23 17:50 ` [Qemu-devel] [PATCH 3/16] S3C SDRAM memory controller Peripheral Vincent Sanders
2009-04-23 17:52 ` [Qemu-devel] [PATCH 4/16] S3C irq controller Vincent Sanders
2009-04-23 17:58 ` [Qemu-devel] [PATCH 05/16] S3C Clock controller peripheral Vincent Sanders
2009-04-23 18:00 ` [Qemu-devel] [PATCH 7/16] S3C serial peripheral Vincent Sanders
2009-04-23 18:02 ` [Qemu-devel] [PATCH 6/16] S3C Timers Vincent Sanders
2009-04-23 18:04 ` [Qemu-devel] [PATCH 8/16] S3C Real Time Clock Vincent Sanders
2009-04-23 18:05 ` [Qemu-devel] [PATCH 9/16] S3C General Purpose IO Vincent Sanders
2009-04-23 18:07 ` [Qemu-devel] [PATCH 10/16] S3C I2C peripheral Vincent Sanders
2009-04-23 18:08 ` [Qemu-devel] [PATCH 11/16] S3C LCD display Vincent Sanders
2009-04-23 18:09 ` [Qemu-devel] [PATCH 12/16] S3C NAND controller Vincent Sanders
2009-04-23 18:11 ` [Qemu-devel] [PATCH 13/16] S3C2410 SOC implementation Vincent Sanders
2009-04-23 18:14 ` [Qemu-devel] [PATCH 14/16] S3C2440 SOC impementation Vincent Sanders
2009-04-23 18:15 ` [Qemu-devel] [PATCH 15/16] Add S3C SOC files to Makefile Vincent Sanders
2009-04-23 18:17 ` [Qemu-devel] [PATCH 16/16] Add two boards which use S3C2410 SOC Vincent Sanders
2009-04-25 12:44   ` Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090423174804.GE4629@derik \
    --to=vince@kyllikki.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).