Re: [PATCH 2/2] DMA: PL330: Removes useless function

2011-12-11 Thread Jassi Brar
On Thu, Dec 8, 2011 at 1:53 PM, Kukjin Kim kgene@samsung.com wrote:
 From: Boojin Kim boojin@samsung.com

 Cc: Jassi Brar jassisinghb...@gmail.com
 Cc: Linus Walleij linus.wall...@linaro.org
 Cc: Vinod Koul vinod.k...@intel.com
 Signed-off-by: Boojin Kim boojin@samsung.com
 Signed-off-by: Kukjin Kim kgene@samsung.com
 ---
  drivers/dma/pl330.c |   47 ---
  1 files changed, 0 insertions(+), 47 deletions(-)

 diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
 index 35f0904..b917477 100644
 --- a/drivers/dma/pl330.c
 +++ b/drivers/dma/pl330.c
 @@ -1512,53 +1512,6 @@ static int pl330_chan_ctrl(void *ch_id, enum 
 pl330_chan_op op)
        return ret;
  }

 -static int pl330_chan_status(void *ch_id, struct pl330_chanstatus *pstatus)
 -{
 -       struct pl330_thread *thrd = ch_id;
 -       struct pl330_dmac *pl330;
 -       struct pl330_info *pi;
 -       void __iomem *regs;
 -       int active;
 -       u32 val;
 -
 -       if (!pstatus || !thrd || thrd-free)
 -               return -EINVAL;
 -
 -       pl330 = thrd-dmac;
 -       pi = pl330-pinfo;
 -       regs = pi-base;
 -
 -       /* The client should remove the DMAC and add again */
 -       if (pl330-state == DYING)
 -               pstatus-dmac_halted = true;
 -       else
 -               pstatus-dmac_halted = false;
 -
 -       val = readl(regs + FSC);
 -       if (val  (1  thrd-id))
 -               pstatus-faulting = true;
 -       else
 -               pstatus-faulting = false;
 -
 -       active = _thrd_active(thrd);
 -
 -       if (!active) {
 -               /* Indicate that the thread is not running */
 -               pstatus-top_req = NULL;
 -               pstatus-wait_req = NULL;
 -       } else {
 -               active--;
 -               pstatus-top_req = thrd-req[active].r;
 -               pstatus-wait_req = !IS_FREE(thrd-req[1 - active])
 -                                       ? thrd-req[1 - active].r : NULL;
 -       }
 -
 -       pstatus-src_addr = readl(regs + SA(thrd-id));
 -       pstatus-dst_addr = readl(regs + DA(thrd-id));
 -
 -       return 0;
 -}

NAK.
Recently Samsung ASoC regressed to update DMA pointer only at period boundaries.
I am sure other platforms would like to have low audio latencies and
hence need this function.
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] ARM: pl330: Fix a race condition

2011-12-11 Thread Jassi Brar
On Sat, Dec 10, 2011 at 1:20 AM, Javi Merino javi.mer...@arm.com wrote:

 What about properly tracking what we have sent to the DMA?  Something
 like the following (warning *ugly* and untested code ahead, may eat your
 kitten):

 diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c
 index f407a6b..3652c4b 100644
 --- a/arch/arm/common/pl330.c
 +++ b/arch/arm/common/pl330.c
 @@ -303,6 +303,7 @@ struct pl330_thread {
        struct _pl330_req req[2];
        /* Index of the last submitted request */
        unsigned lstenq;
 +       int req_running;
  };

  enum pl330_dmac_state {
 @@ -836,31 +837,6 @@ static inline u32 _state(struct pl330_thread *thrd)
        }
  }

 -/* If the request 'req' of thread 'thrd' is currently active */
 -static inline bool _req_active(struct pl330_thread *thrd,
 -               struct _pl330_req *req)
 -{
 -       void __iomem *regs = thrd-dmac-pinfo-base;
 -       u32 buf = req-mc_bus, pc = readl(regs + CPC(thrd-id));
 -
 -       if (IS_FREE(req))
 -               return false;
 -
 -       return (pc = buf  pc = buf + req-mc_len) ? true : false;
 -}
 -
 -/* Returns 0 if the thread is inactive, ID of active req + 1 otherwise */
 -static inline unsigned _thrd_active(struct pl330_thread *thrd)
 -{
 -       if (_req_active(thrd, thrd-req[0]))
 -               return 1; /* First req active */
 -
 -       if (_req_active(thrd, thrd-req[1]))
 -               return 2; /* Second req active */
 -
 -       return 0;
 -}
 -
  static void _stop(struct pl330_thread *thrd)
  {
        void __iomem *regs = thrd-dmac-pinfo-base;
 @@ -897,11 +873,13 @@ static bool _trigger(struct pl330_thread *thrd)
        if (_state(thrd) != PL330_STATE_STOPPED)
                return true;

 -       if (!IS_FREE(thrd-req[1 - thrd-lstenq]))
 +       if (!IS_FREE(thrd-req[1 - thrd-lstenq])) {
                req = thrd-req[1 - thrd-lstenq];
 -       else if (!IS_FREE(thrd-req[thrd-lstenq]))
 +               thrd-req_running = 2 - thrd-lstenq;
 +       } else if (!IS_FREE(thrd-req[thrd-lstenq])) {
                req = thrd-req[thrd-lstenq];
 -       else
 +               thrd-req_running = 1 + thrd-lstenq;
 +       } else
                req = NULL;

        /* Return if no request */
 @@ -1384,6 +1362,7 @@ static void pl330_dotask(unsigned long data)
                        thrd-req[1].r = NULL;
                        MARK_FREE(thrd-req[0]);
                        MARK_FREE(thrd-req[1]);
 +                       thrd-req_running = 0;

                        /* Clear the reset flag */
                        pl330-dmac_tbd.reset_chan = ~(1  i);
 @@ -1461,7 +1440,7 @@ int pl330_update(const struct pl330_info *pi)

                        thrd = pl330-channels[id];

 -                       active = _thrd_active(thrd);
 +                       active = thrd-req_running;
                        if (!active) /* Aborted */
                                continue;

 @@ -1469,6 +1448,7 @@ int pl330_update(const struct pl330_info *pi)

                        rqdone = thrd-req[active];
                        MARK_FREE(rqdone);
 +                       thrd-req_running = 0;

                        /* Get going again ASAP */
                        _start(thrd);
 @@ -1527,10 +1507,11 @@ int pl330_chan_ctrl(void *ch_id, enum
 pl330_chan_op op)
                thrd-req[1].r = NULL;
                MARK_FREE(thrd-req[0]);
                MARK_FREE(thrd-req[1]);
 +               thrd-req_running = 0;
                break;

        case PL330_OP_ABORT:
 -               active = _thrd_active(thrd);
 +               active = thrd-req_running;

                /* Make sure the channel is stopped */
                _stop(thrd);
 @@ -1543,10 +1524,11 @@ int pl330_chan_ctrl(void *ch_id, enum
 pl330_chan_op op)

                thrd-req[active].r = NULL;
                MARK_FREE(thrd-req[active]);
 +               thrd-req_running = 0;

                /* Start the next */
        case PL330_OP_START:
 -               if (!_thrd_active(thrd)  !_start(thrd))
 +               if (!thrd-req_running  !_start(thrd))
                        ret = -EIO;
                break;

 @@ -1587,7 +1569,7 @@ int pl330_chan_status(void *ch_id, struct
 pl330_chanstatus *pstatus)
        else
                pstatus-faulting = false;

 -       active = _thrd_active(thrd);
 +       active = thrd-req_running;

        if (!active) {
                /* Indicate that the thread is not running */
 @@ -1662,6 +1644,7 @@ void *pl330_request_channel(const struct
 pl330_info *pi)
                                MARK_FREE(thrd-req[0]);
                                thrd-req[1].r = NULL;
                                MARK_FREE(thrd-req[1]);
 +                               thrd-req_running = 0;
                                break;
                        }
                }
 @@ -1775,6 +1758,8 @@ static inline void _reset_thread(struct
 pl330_thread *thrd)
                                + pi-mcbufsz / 2;
        thrd-req[1].r = NULL;
 

Re: [PATCH v2] ARM: pl330: Fix a race condition

2011-12-11 Thread Javi Merino
On 11/12/11 10:51, Jassi Brar wrote:
 On Sat, Dec 10, 2011 at 1:20 AM, Javi Merino javi.mer...@arm.com wrote:

 What about properly tracking what we have sent to the DMA?  Something
 like the following (warning *ugly* and untested code ahead, may eat your
 kitten):

 Yeah, this is like I said 'marker' method. Though we can clean it up a bit.
 1) Pack req_running and lstenq together. Make lsteng return invalid value
 should there be no buff programmed, otherwise 0 or 1.

This can lead to starvation.  If lstenq is -1 when the DMA hasn't been
programmed yet, in _trigger() you don't know which buffer is the
oldest, so you may end up always starting the new buffer and
forgetting about the other one.  lstenq as it is right now prevents that.

 2) Try to merge req_running modification as part of MARK_FREE.

Yes, I thought about that, but I didn't want to code a proper solution
and then receive a no, we shouldn't go down this road.

I'll clean it up and send a proper patch.

Cheers,
Javi

-- IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium.  Thank you.

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] ARM: pl330: Fix a race condition

2011-12-11 Thread Jassi Brar
On 11 December 2011 20:39, Javi Merino javi.mer...@arm.com wrote:

 What about properly tracking what we have sent to the DMA?  Something
 like the following (warning *ugly* and untested code ahead, may eat your
 kitten):

 Yeah, this is like I said 'marker' method. Though we can clean it up a bit.
 1) Pack req_running and lstenq together. Make lsteng return invalid value
 should there be no buff programmed, otherwise 0 or 1.

 This can lead to starvation.  If lstenq is -1 when the DMA hasn't been
 programmed yet, in _trigger() you don't know which buffer is the
 oldest, so you may end up always starting the new buffer and
 forgetting about the other one.  lstenq as it is right now prevents that.

Sorry I don't understand. If lstenq is -1 that means there's no req programmed
so trigger need not do anything. I didn't say we don't need to do anything else.
Though it's just an idea I haven't implemented and it may not work out.
Just please give it a try if you can. Thanks.
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] ARM: pl330: Fix a race condition

2011-12-11 Thread Javi Merino
On 11/12/11 17:10, Jassi Brar wrote:
 On 11 December 2011 20:39, Javi Merino javi.mer...@arm.com wrote:

 What about properly tracking what we have sent to the DMA?  Something
 like the following (warning *ugly* and untested code ahead, may eat your
 kitten):

 Yeah, this is like I said 'marker' method. Though we can clean it up a bit.
 1) Pack req_running and lstenq together. Make lsteng return invalid value
 should there be no buff programmed, otherwise 0 or 1.

 This can lead to starvation.  If lstenq is -1 when the DMA hasn't been
 programmed yet, in _trigger() you don't know which buffer is the
 oldest, so you may end up always starting the new buffer and
 forgetting about the other one.  lstenq as it is right now prevents that.

 Sorry I don't understand. If lstenq is -1 that means there's no req programmed
 so trigger need not do anything. I didn't say we don't need to do anything 
 else.

Currently lstenq tracks the last request that pl330_submit_req() has
enqueued.  I think we should add a req_running (or any other name) that
tracks what _trigger() has sent to the DMA.  If we pack them together we
lose some information and I don't see a way of packing them safely.

 Though it's just an idea I haven't implemented and it may not work out.

I was trying to implement it and got stuck in _trigger() thinking ok,
so which buffer am I supposed to trigger now...

 Just please give it a try if you can. Thanks.

I have a patch that seems to be working.  Let me test it a little bit
more and I'll send it to the list.

Cheers,
Javi

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: PL330: Fix driver freeze

2011-12-11 Thread Javi Merino
Add a req_running field to the pl330_thread to track which request (if
any) has been submitted to the DMA.  This mechanism replaces the old
one in which we tried to guess the same by looking at the PC of the
DMA, which could prevent the driver from sending more requests if it
didn't guess correctly.

Signed-off-by: Javi Merino javi.mer...@arm.com
Cc: Jassi Brar jaswinder.si...@linaro.org
---
 arch/arm/common/pl330.c |  116 ---
 1 files changed, 49 insertions(+), 67 deletions(-)

diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c
index f407a6b..8d8df74 100644
--- a/arch/arm/common/pl330.c
+++ b/arch/arm/common/pl330.c
@@ -221,17 +221,6 @@
  */
 #define MCODE_BUFF_PER_REQ 256
 
-/*
- * Mark a _pl330_req as free.
- * We do it by writing DMAEND as the first instruction
- * because no valid request is going to have DMAEND as
- * its first instruction to execute.
- */
-#define MARK_FREE(req) do { \
-   _emit_END(0, (req)-mc_cpu); \
-   (req)-mc_len = 0; \
-   } while (0)
-
 /* If the _pl330_req is available to the client */
 #define IS_FREE(req)   (*((u8 *)((req)-mc_cpu)) == CMD_DMAEND)
 
@@ -301,8 +290,10 @@ struct pl330_thread {
struct pl330_dmac *dmac;
/* Only two at a time */
struct _pl330_req req[2];
-   /* Index of the last submitted request */
+   /* Index of the last enqueued request */
unsigned lstenq;
+   /* Index of the last submitted request or -1 if the DMA is stopped */
+   int req_running;
 };
 
 enum pl330_dmac_state {
@@ -778,6 +769,22 @@ static inline void _execute_DBGINSN(struct pl330_thread 
*thrd,
writel(0, regs + DBGCMD);
 }
 
+/*
+ * Mark a _pl330_req as free.
+ * We do it by writing DMAEND as the first instruction
+ * because no valid request is going to have DMAEND as
+ * its first instruction to execute.
+ */
+static void mark_free(struct pl330_thread *thrd, int idx)
+{
+   struct _pl330_req *req = thrd-req[idx];
+
+   _emit_END(0, req-mc_cpu);
+   req-mc_len = 0;
+
+   thrd-req_running = -1;
+}
+
 static inline u32 _state(struct pl330_thread *thrd)
 {
void __iomem *regs = thrd-dmac-pinfo-base;
@@ -836,31 +843,6 @@ static inline u32 _state(struct pl330_thread *thrd)
}
 }
 
-/* If the request 'req' of thread 'thrd' is currently active */
-static inline bool _req_active(struct pl330_thread *thrd,
-   struct _pl330_req *req)
-{
-   void __iomem *regs = thrd-dmac-pinfo-base;
-   u32 buf = req-mc_bus, pc = readl(regs + CPC(thrd-id));
-
-   if (IS_FREE(req))
-   return false;
-
-   return (pc = buf  pc = buf + req-mc_len) ? true : false;
-}
-
-/* Returns 0 if the thread is inactive, ID of active req + 1 otherwise */
-static inline unsigned _thrd_active(struct pl330_thread *thrd)
-{
-   if (_req_active(thrd, thrd-req[0]))
-   return 1; /* First req active */
-
-   if (_req_active(thrd, thrd-req[1]))
-   return 2; /* Second req active */
-
-   return 0;
-}
-
 static void _stop(struct pl330_thread *thrd)
 {
void __iomem *regs = thrd-dmac-pinfo-base;
@@ -892,17 +874,22 @@ static bool _trigger(struct pl330_thread *thrd)
struct _arg_GO go;
unsigned ns;
u8 insn[6] = {0, 0, 0, 0, 0, 0};
+   int idx;
 
/* Return if already ACTIVE */
if (_state(thrd) != PL330_STATE_STOPPED)
return true;
 
-   if (!IS_FREE(thrd-req[1 - thrd-lstenq]))
-   req = thrd-req[1 - thrd-lstenq];
-   else if (!IS_FREE(thrd-req[thrd-lstenq]))
-   req = thrd-req[thrd-lstenq];
-   else
-   req = NULL;
+   idx = 1 - thrd-lstenq;
+   if (!IS_FREE(thrd-req[idx]))
+   req = thrd-req[idx];
+   else {
+   idx = thrd-lstenq;
+   if (!IS_FREE(thrd-req[idx]))
+   req = thrd-req[idx];
+   else
+   req = NULL;
+   }
 
/* Return if no request */
if (!req || !req-r)
@@ -933,6 +920,8 @@ static bool _trigger(struct pl330_thread *thrd)
/* Only manager can execute GO */
_execute_DBGINSN(thrd, insn, true);
 
+   thrd-req_running = idx;
+
return true;
 }
 
@@ -1382,8 +1371,8 @@ static void pl330_dotask(unsigned long data)
 
thrd-req[0].r = NULL;
thrd-req[1].r = NULL;
-   MARK_FREE(thrd-req[0]);
-   MARK_FREE(thrd-req[1]);
+   mark_free(thrd, 0);
+   mark_free(thrd, 1);
 
/* Clear the reset flag */
pl330-dmac_tbd.reset_chan = ~(1  i);
@@ -1461,14 +1450,12 @@ int pl330_update(const struct pl330_info *pi)
 
thrd = pl330-channels[id];
 
-   active = _thrd_active(thrd);
-

Re: [PATCH 6/8] common: dma-mapping: change alloc/free_coherent method to more generic alloc/free_attrs

2011-12-11 Thread Stephen Rothwell
Hi Marek,

On Fri, 09 Dec 2011 17:39:56 +0100 Marek Szyprowski m.szyprow...@samsung.com 
wrote:

 Introduce new alloc/free/mmap methods that take attributes argument.
 alloc/free_coherent can be implemented on top of the new alloc/free
 calls with NULL attributes. dma_alloc_non_coherent can be implemented
 using DMA_ATTR_NONCOHERENT attribute, dma_alloc_writecombine can also
 use separate DMA_ATTR_WRITECOMBINE attribute. This way the drivers will
 get more generic, platform independent way of allocating dma memory
 buffers with specific parameters.
 
 One more attribute can be usefull: DMA_ATTR_NOKERNELVADDR. Buffers with
 such attribute will not have valid kernel virtual address. They might be
 usefull for drivers that only exports the DMA buffers to userspace (like
 for example V4L2 or ALSA).
 
 mmap method is introduced to let the drivers create a user space mapping
 for a DMA buffer in generic, architecture independent way.
 
 TODO: update all dma_map_ops clients for all architectures

To give everyone some chance, you should come up with a transition plan
rather than this attempt to fix everyone at once approach.  You could
(for example) just add the new methods now and only remove them in the
following merge window when all the architectures have had a chance to
migrate.

And, in fact, (as I presume you know) this patch just breaks everyone
with no attempt to cope.

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/


pgpVg9EeL3jrr.pgp
Description: PGP signature


RE: [CPUFREQ] EXYNOS: Make EXYNOS common cpufreq driver

2011-12-11 Thread Kukjin Kim
Dave Jones wrote:
 
 On Wed, Dec 07, 2011 at 11:44:21AM +0900, Kukjin Kim wrote:
   From: Jaecheol Lee jc@samsung.com
  
   To support various EXYNOS series SoCs commonly,
   added exynos common structure.
   exynos-cpufreq.c = EXYNOS series common cpufreq driver
   exynos4210-cpufreq.c = EXYNOS4210 support cpufreq driver
  
   Signed-off-by: Jaecheol Lee jc@samsung.com
   Signed-off-by: Kukjin Kim kgene@samsung.com
 
 Please rediff this one and resend. It doesn't apply on top of the other
 patches..
 
 Applying: [CPUFREQ] EXYNOS4210: Remove code about bus on cpufreq
 Applying: [CPUFREQ] EXYNOS4210: Update frequency table for cpu divider
 Applying: [CPUFREQ] EXYNOS4210: cpufreq code is changed for stable working
 Applying: [CPUFREQ] EXYNOS: Make EXYNOS common cpufreq driver
 error: patch failed: drivers/cpufreq/Makefile:42
 error: drivers/cpufreq/Makefile: patch does not apply
 Patch failed at 0005 [CPUFREQ] EXYNOS: Make EXYNOS common cpufreq driver
 When you have resolved this problem run git am --resolved.
 If you would prefer to skip this patch, instead run git am --skip.
 To restore the original branch and stop patching run git am --abort.
 
 I'll push out what I have applied so far to cpufreq.next
 
Hi Dave

You can find updated 4th patch at below.
I rebased it on your latest cpufreq/next branch.
And the 5th patch has no problem to apply.

If any problem, please let me know.

As a note, since my git send-email has problem, re-submitted them on Sunday.
Please kindly ignore that.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim kgene@samsung.com, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

From 6cfb3b48905c4e5796fe79688df0ef123df2140d Mon Sep 17 00:00:00 2001
From: Jaecheol Lee jc@samsung.com
Date: Tue, 6 Dec 2011 10:02:38 +0900
Subject: [PATCH V2 4/5] [CPUFREQ] EXYNOS: Make EXYNOS common cpufreq driver

To support various EXYNOS series SoCs commonly,
added exynos common structure.
exynos-cpufreq.c = EXYNOS series common cpufreq driver
exynos4210-cpufreq.c = EXYNOS4210 support cpufreq driver

Signed-off-by: Jaecheol Lee jc@samsung.com
Signed-off-by: Kukjin Kim kgene@samsung.com
---
Changes since v1:
- Rebased on latest cpufreq repository.

 arch/arm/mach-exynos/include/mach/cpufreq.h |   34 +++
 drivers/cpufreq/Kconfig.arm |   15 +-
 drivers/cpufreq/Makefile|1 +
 drivers/cpufreq/exynos-cpufreq.c|  296 
 drivers/cpufreq/exynos4210-cpufreq.c|  385 +--
 5 files changed, 414 insertions(+), 317 deletions(-)
 create mode 100644 arch/arm/mach-exynos/include/mach/cpufreq.h
 create mode 100644 drivers/cpufreq/exynos-cpufreq.c

diff --git a/arch/arm/mach-exynos/include/mach/cpufreq.h 
b/arch/arm/mach-exynos/include/mach/cpufreq.h
new file mode 100644
index 000..3df27f2
--- /dev/null
+++ b/arch/arm/mach-exynos/include/mach/cpufreq.h
@@ -0,0 +1,34 @@
+/* linux/arch/arm/mach-exynos/include/mach/cpufreq.h
+ *
+ * Copyright (c) 2010 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * EXYNOS - CPUFreq support
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+enum cpufreq_level_index {
+   L0, L1, L2, L3, L4,
+   L5, L6, L7, L8, L9,
+   L10, L11, L12, L13, L14,
+   L15, L16, L17, L18, L19,
+   L20,
+};
+
+struct exynos_dvfs_info {
+   unsigned long   mpll_freq_khz;
+   unsigned intpll_safe_idx;
+   unsigned intpm_lock_idx;
+   unsigned intmax_support_idx;
+   unsigned intmin_support_idx;
+   struct clk  *cpu_clk;
+   unsigned int*volt_table;
+   struct cpufreq_frequency_table  *freq_table;
+   void (*set_freq)(unsigned int, unsigned int);
+   bool (*need_apll_change)(unsigned int, unsigned int);
+};
+
+extern int exynos4210_cpufreq_init(struct exynos_dvfs_info *);
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 72a0044..e0664fe 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -21,12 +21,19 @@ config ARM_S5PV210_CPUFREQ
 
  If in doubt, say N.
 
+config ARM_EXYNOS_CPUFREQ
+   bool SAMSUNG EXYNOS SoCs
+   depends on ARCH_EXYNOS
+   select ARM_EXYNOS4210_CPUFREQ if CPU_EXYNOS4210
+   default y
+   help
+ This adds the CPUFreq driver common part for Samsung
+ EXYNOS SoCs.
+
+ If in doubt, say N.
+
 config ARM_EXYNOS4210_CPUFREQ
bool Samsung EXYNOS4210
-   depends on CPU_EXYNOS4210
-   default y
help
  This adds the CPUFreq driver for Samsung EXYNOS4210
  SoC (S5PV310 or S5PC210).
-
- If in doubt, say N.
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index ce75fcb..ac000fa 100644
--- a/drivers/cpufreq/Makefile
+++ 

RE: PL330: Merge PL330 drivers

2011-12-11 Thread Kukjin Kim
Boojin Kim wrote:
 
 In-Reply-To:
 
 PL330 driver is divided into 2 parts.
 First is the PL330 API driver that located on driver/dma/.
 Second is the low-level PL330 driver that is located on arch/arm/common/.
 But, It's not needed anymore to divided PL330 driver into 2 parts
 Low-level PL330 driver is only used for PL330 API driver on driver/dma
 because samsung specific S3C-PL330 driver was gone.
 So, This patch merges 'arch/arm/common/pl330' into 'driver/dma/pl330.c'.
 
 [PATCH 1/2] DMA: PL330: Merge PL330 drivers
 [PATCH 2/2] DMA: PL330: Remove an unused function

Hi all,

Since Boojin's git send-email has problem, this series re-submitted on
Sunday like following :(
Please kindly ignore this series.

[PATCH 1/3] ARM: EXYNOS: Support DMA driver for Exynos4x12 series
[PATCH 2/3] DMA: PL330: Merge PL330 drivers
[PATCH 3/3] DMA: PL330: Remove an unused function

Sorry for bothering.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim kgene@samsung.com, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 2/2] DMA: PL330: Removes useless function

2011-12-11 Thread Boojin Kim
Jassi Brar wrote:

 Subject: Re: [PATCH 2/2] DMA: PL330: Removes useless function

 On Thu, Dec 8, 2011 at 1:53 PM, Kukjin Kim kgene@samsung.com
 wrote:
  From: Boojin Kim boojin@samsung.com
 
  Cc: Jassi Brar jassisinghb...@gmail.com
  Cc: Linus Walleij linus.wall...@linaro.org
  Cc: Vinod Koul vinod.k...@intel.com
  Signed-off-by: Boojin Kim boojin@samsung.com
  Signed-off-by: Kukjin Kim kgene@samsung.com
  ---
   drivers/dma/pl330.c |   47 -
 --
   1 files changed, 0 insertions(+), 47 deletions(-)
 
  diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
  index 35f0904..b917477 100644
  --- a/drivers/dma/pl330.c
  +++ b/drivers/dma/pl330.c
  @@ -1512,53 +1512,6 @@ static int pl330_chan_ctrl(void *ch_id, enum
 pl330_chan_op op)
 return ret;
   }
 
  -static int pl330_chan_status(void *ch_id, struct pl330_chanstatus
 *pstatus)
  -{
  -   struct pl330_thread *thrd = ch_id;
  -   struct pl330_dmac *pl330;
  -   struct pl330_info *pi;
  -   void __iomem *regs;
  -   int active;
  -   u32 val;
  -
  -   if (!pstatus || !thrd || thrd-free)
  -   return -EINVAL;
  -
  -   pl330 = thrd-dmac;
  -   pi = pl330-pinfo;
  -   regs = pi-base;
  -
  -   /* The client should remove the DMAC and add again */
  -   if (pl330-state == DYING)
  -   pstatus-dmac_halted = true;
  -   else
  -   pstatus-dmac_halted = false;
  -
  -   val = readl(regs + FSC);
  -   if (val  (1  thrd-id))
  -   pstatus-faulting = true;
  -   else
  -   pstatus-faulting = false;
  -
  -   active = _thrd_active(thrd);
  -
  -   if (!active) {
  -   /* Indicate that the thread is not running */
  -   pstatus-top_req = NULL;
  -   pstatus-wait_req = NULL;
  -   } else {
  -   active--;
  -   pstatus-top_req = thrd-req[active].r;
  -   pstatus-wait_req = !IS_FREE(thrd-req[1 - active])
  -   ? thrd-req[1 - active].r : NULL;
  -   }
  -
  -   pstatus-src_addr = readl(regs + SA(thrd-id));
  -   pstatus-dst_addr = readl(regs + DA(thrd-id));
  -
  -   return 0;
  -}
 
 NAK.
 Recently Samsung ASoC regressed to update DMA pointer only at period
 boundaries.
 I am sure other platforms would like to have low audio latencies and
 hence need this function.

ASoC doesn't use DMA HW pointer to get its position with the new pl330 driver 
on dmaengine. So, pl330_chan_status() isn't used anymore. It just brings a 
build warning.

Thanks you.


 ___
 linux-arm-kernel mailing list
 linux-arm-ker...@lists.infradead.org
 http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 1/2] DMA: PL330: Merge PL330 driver into drivers/dma/

2011-12-11 Thread Boojin Kim
Jassi Brar [mailto:jassisinghb...@gmail.com] wrote:


 
 Please try to maintain general order of functions and
 definitions/declarations
 in the code.

Thanks for your review. I will re-summit with our comment.


--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: EXYNOS: Use gpio_request_one

2011-12-11 Thread Jingoo Han
By using gpio_request_one it is possible to set the direction
and initial value in one shot. Thus, using gpio_request_one can
make the code simpler.

Signed-off-by: Jingoo Han jg1@samsung.com
---
 arch/arm/mach-exynos/mach-nuri.c   |4 +---
 arch/arm/mach-exynos/mach-smdkv310.c   |4 +---
 arch/arm/mach-exynos/mach-universal_c210.c |   10 +++---
 3 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index 236bbe1..c96de1f 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -249,9 +249,7 @@ static int nuri_bl_init(struct device *dev)
 {
int ret, gpio = EXYNOS4_GPE2(3);
 
-   ret = gpio_request(gpio, LCD_LDO_EN);
-   if (!ret)
-   gpio_direction_output(gpio, 0);
+   ret = gpio_request_one(gpio, GPIOF_OUT_INIT_LOW, LCD_LD0_EN);
 
return ret;
 }
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c 
b/arch/arm/mach-exynos/mach-smdkv310.c
index cec2afa..cbf31bd 100644
--- a/arch/arm/mach-exynos/mach-smdkv310.c
+++ b/arch/arm/mach-exynos/mach-smdkv310.c
@@ -129,9 +129,7 @@ static void lcd_lte480wv_set_power(struct plat_lcd_data *pd,
gpio_free(EXYNOS4_GPD0(1));
 #endif
/* fire nRESET on power up */
-   gpio_request(EXYNOS4_GPX0(6), GPX0);
-
-   gpio_direction_output(EXYNOS4_GPX0(6), 1);
+   gpio_request_one(EXYNOS4_GPX0(6), GPIOF_OUT_INIT_HIGH, GPX0);
mdelay(100);
 
gpio_set_value(EXYNOS4_GPX0(6), 0);
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c 
b/arch/arm/mach-exynos/mach-universal_c210.c
index a2a177f..0a04cd6 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -608,8 +608,7 @@ static void __init universal_tsp_init(void)
 
/* TSP_LDO_ON: XMDMADDR_11 */
gpio = EXYNOS4_GPE2(3);
-   gpio_request(gpio, TSP_LDO_ON);
-   gpio_direction_output(gpio, 1);
+   gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, TSP_LDO_ON);
gpio_export(gpio, 0);
 
/* TSP_INT: XMDMADDR_7 */
@@ -669,8 +668,7 @@ static void __init universal_touchkey_init(void)
i2c_gpio12_devs[0].irq = gpio_to_irq(gpio);
 
gpio = EXYNOS4_GPE3(3); /* XMDMDATA_3 */
-   gpio_request(gpio, 3_TOUCH_EN);
-   gpio_direction_output(gpio, 1);
+   gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, 3_TOUCH_EN);
 }
 
 static struct s3c2410_platform_i2c universal_i2c0_platdata __initdata = {
@@ -1000,9 +998,7 @@ static void __init universal_map_io(void)
 void s5p_tv_setup(void)
 {
/* direct HPD to HDMI chip */
-   gpio_request(EXYNOS4_GPX3(7), hpd-plug);
-
-   gpio_direction_input(EXYNOS4_GPX3(7));
+   gpio_request_one(EXYNOS4_GPX3(7), GPIOF_IN, hpd-plug);
s3c_gpio_cfgpin(EXYNOS4_GPX3(7), S3C_GPIO_SFN(0x3));
s3c_gpio_setpull(EXYNOS4_GPX3(7), S3C_GPIO_PULL_NONE);
 
-- 
1.7.1


--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: S5PV210: Use gpio_request_one

2011-12-11 Thread Jingoo Han
By using gpio_request_one it is possible to set the direction
and initial value in one shot. Thus, using gpio_request_one can
make the code simpler.

Signed-off-by: Jingoo Han jg1@samsung.com
---
 arch/arm/mach-s5pv210/mach-aquila.c   |3 +--
 arch/arm/mach-s5pv210/mach-goni.c |6 ++
 arch/arm/mach-s5pv210/mach-smdkv210.c |   10 +++---
 3 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/arch/arm/mach-s5pv210/mach-aquila.c 
b/arch/arm/mach-s5pv210/mach-aquila.c
index 5811a96..404ac7a 100644
--- a/arch/arm/mach-s5pv210/mach-aquila.c
+++ b/arch/arm/mach-s5pv210/mach-aquila.c
@@ -595,8 +595,7 @@ static struct s3c_sdhci_platdata aquila_hsmmc2_data 
__initdata = {
 
 static void aquila_setup_sdhci(void)
 {
-   gpio_request(AQUILA_EXT_FLASH_EN, FLASH_EN);
-   gpio_direction_output(AQUILA_EXT_FLASH_EN, 1);
+   gpio_request_one(AQUILA_EXT_FLASH_EN, GPIOF_OUT_INIT_HIGH, FLASH_EN);
 
s3c_sdhci0_set_platdata(aquila_hsmmc0_data);
s3c_sdhci1_set_platdata(aquila_hsmmc1_data);
diff --git a/arch/arm/mach-s5pv210/mach-goni.c 
b/arch/arm/mach-s5pv210/mach-goni.c
index 15edcae..e2754e9 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -227,8 +227,7 @@ static void __init goni_radio_init(void)
i2c1_devs[0].irq = gpio_to_irq(gpio);
 
gpio = S5PV210_GPJ2(5); /* XMSMDATA_5 */
-   gpio_request(gpio, FM_RST);
-   gpio_direction_output(gpio, 1);
+   gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, FM_RST);
 }
 
 /* TSP */
@@ -264,8 +263,7 @@ static void __init goni_tsp_init(void)
int gpio;
 
gpio = S5PV210_GPJ1(3); /* XMSMADDR_11 */
-   gpio_request(gpio, TSP_LDO_ON);
-   gpio_direction_output(gpio, 1);
+   gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, TSP_LDO_ON);
gpio_export(gpio, 0);
 
gpio = S5PV210_GPJ0(5); /* XMSMADDR_5 */
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c 
b/arch/arm/mach-s5pv210/mach-smdkv210.c
index a9106c3..10a4ec6 100644
--- a/arch/arm/mach-s5pv210/mach-smdkv210.c
+++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
@@ -153,15 +153,12 @@ static void smdkv210_lte480wv_set_power(struct 
plat_lcd_data *pd,
 {
if (power) {
 #if !defined(CONFIG_BACKLIGHT_PWM)
-   gpio_request(S5PV210_GPD0(3), GPD0);
-   gpio_direction_output(S5PV210_GPD0(3), 1);
+   gpio_request_one(S5PV210_GPD0(3), GPIOF_OUT_INIT_HIGH, GPD0);
gpio_free(S5PV210_GPD0(3));
 #endif
 
/* fire nRESET on power up */
-   gpio_request(S5PV210_GPH0(6), GPH0);
-
-   gpio_direction_output(S5PV210_GPH0(6), 1);
+   gpio_request_one(S5PV210_GPH0(6), GPIOF_OUT_INIT_HIGH, GPH0);
 
gpio_set_value(S5PV210_GPH0(6), 0);
mdelay(10);
@@ -172,8 +169,7 @@ static void smdkv210_lte480wv_set_power(struct 
plat_lcd_data *pd,
gpio_free(S5PV210_GPH0(6));
} else {
 #if !defined(CONFIG_BACKLIGHT_PWM)
-   gpio_request(S5PV210_GPD0(3), GPD0);
-   gpio_direction_output(S5PV210_GPD0(3), 0);
+   gpio_request_one(S5PV210_GPD0(3), GPIOF_OUT_INIT_LOW, GPD0);
gpio_free(S5PV210_GPD0(3));
 #endif
}
-- 
1.7.1


--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: SAMSUNG: Add a callback 'notify_after' for PWM backlight control

2011-12-11 Thread Jingoo Han
The callback 'notify_after' was added to struct platform_pwm_backlight_data
provided by PWM backlight driver. Therefore, this patch adds a callback
'notify_after' which can be called after pwm_enable, pwm_disable and pwm_config.

Signed-off-by: Jingoo Han jg1@samsung.com
---
 arch/arm/plat-samsung/dev-backlight.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-samsung/dev-backlight.c 
b/arch/arm/plat-samsung/dev-backlight.c
index e657305..90abd55 100644
--- a/arch/arm/plat-samsung/dev-backlight.c
+++ b/arch/arm/plat-samsung/dev-backlight.c
@@ -116,6 +116,8 @@ void samsung_bl_set(struct samsung_bl_gpio_info *gpio_info,
samsung_bl_data-init = bl_data-init;
if (bl_data-notify)
samsung_bl_data-notify = bl_data-notify;
+   if (bl_data-notify_after)
+   samsung_bl_data-notify_after = bl_data-notify_after;
if (bl_data-exit)
samsung_bl_data-exit = bl_data-exit;
if (bl_data-check_fb)
-- 
1.7.1


--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RESEND][PATCH] ARM: Exynos: Add irq domain and device tree support for interrupt combiner

2011-12-11 Thread Rob Herring
On 12/11/2011 12:48 AM, Thomas Abraham wrote:
 A common irq domain for the interrupts managed by the interrupt combiners is
 setup. All the instances of irq combiner reference the common irq domain for
 translating hardware interrupts to linux irq number.
 
 In case of device tree based boot, a interrupt specifier translator is setup
 that can translate interrupt specifiers for device nodes which use combiner
 as their interrupt parent.
 
 Signed-off-by: Thomas Abraham thomas.abra...@linaro.org
 ---
 Please ignore the previous post patch since that patch has a compilation error
 when CONFIG_OF was not defined.
 
 This patch is based on the following tree.
 http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git 
 for-next
 
  .../bindings/arm/samsung/interrupt-combiner.txt|   27 +
  arch/arm/mach-exynos/cpu.c |   29 ++---
  arch/arm/mach-exynos/irq-combiner.c|   62 
 +---
  3 files changed, 100 insertions(+), 18 deletions(-)
  create mode 100644 
 Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt
 
 diff --git 
 a/Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt 
 b/Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt
 new file mode 100644
 index 000..6c960dc
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt
 @@ -0,0 +1,27 @@
 +* Samsung Exynos Interrupt Combiner Controller
 +
 +Samsung's Exynos4 architecture includes a interrupt combiner which can 
 combine
 +interrupt sources as a group and provide a single interrupt request for the
 +group. The interrupt request from each group are connected to a parent 
 interrupt
 +controller, such as GIC in case of Exynos4210.
 +
 +Required properties:
 +- compatible: should be samsung,exynos4210-combiner.
 +- #interrupt-cells: should be 2. The meaning of the cells are
 + * First Cell: Combiner Group Number.
 + * Second Cell: Interrupt number within the group.
 +- reg: Base address and size of interrupt combiner registers.
 +- interrupt-controller: Identifies the node as an interrupt controller.
 +
 +Optional properties:
 +- interrupt-parent: pHandle of the parent interrupt controller, if not
 +  inherited from the parent node.
 +
 +Example:
 +
 + combiner:interrupt-controller@1044 {
 + compatible = samsung,exynos4120-combiner;
 + #interrupt-cells = 2;
 + interrupt-controoler;

s/controoler/controller/

 + reg = 0x1044 0x1000;
 + };

[snip]

 +
 +int __init combiner_init_irq_domain(unsigned int irq_base, unsigned int 
 nr_irq,

Make irq_base signed.

 + struct device_node *np)
 +{
 + struct irq_domain *domain = combiner_irq_domain;
 +
 + domain-irq_base = irq_alloc_descs(irq_base, irq_base, nr_irq, 0);

This should be irq_alloc_descs(irq_base, 1,

So that dynamic allocation can work when irq_base is -1.

 + if (domain-irq_base  0) {
 + pr_err(failed to alloc irq descs, combiner init failed\n);
 + return -EBUSY;

On failure, just warn and do:

domain-irq_base = irq_base

instead of returning unless all platforms using this are completely
converted over to support dynamic Linux virq mapping.

Also you should update your platforms' to set mdesc.nr_irq to
NR_IRQS_LEGACY. And test with SPARSE_IRQ turned on.

Rob

 + }
 + domain-nr_irq = nr_irq;
 + domain-ops = combiner_irq_domain_ops;
 + domain-of_node = np;
 + irq_domain_add(domain);
 + return 0;
 +}

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3] s5p-g2d: add G2D to mach-nuri

2011-12-11 Thread Mark Brown
On Fri, Dec 09, 2011 at 05:04:41PM +0100, Kamil Debski wrote:

 index 236bbe1..5251e91 100644
 --- a/arch/arm/mach-exynos/mach-nuri.c
 +++ b/arch/arm/mach-exynos/mach-nuri.c
 @@ -1262,6 +1262,7 @@ static struct platform_device *nuri_devices[] 
 __initdata = {
   s3c_device_i2c3,
   i2c9_gpio,
   s3c_device_adc,
 + s5p_device_g2d,

For devices like g2d which are always part of the SoC and which don't
require any external wiring on the board I was thinking we should just
have the core code for the SoC register the device rather than including
it in each board individually.  It'd save effort and ensure that people
automatically get to use the feature.

The crypto accelerators are another example of this - it's not really
board specific if they're useful.
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V5] mmc: core: HS200 mode support for eMMC 4.5

2011-12-11 Thread Girish K S
On 5 December 2011 20:29, Saugata Das saugata@linaro.org wrote:
 Hi Girish

 Please refer to Figure 71 (HS200 device output timing) of the MMC-4.5
 spec. It shows that both CMD and DATA[7-0] will have some latency till
 valid window. This implies that even the CMD line will need tuning for
 reading the response. The specification talks about identifying
 sampling point for data lines by reading tuning blocks. Based on host
 controller capability, even the CMD line will get the good sample
 point during the same tuning sequence.

 We need to have the tuning done (execute_tuning) soon after switching
 to HS200 mode and 200MHz clock.

If i make a change as per subhash suggestionset bus width before
setting the HS200 mode. then it will affect the entire frame work of
mmc which is developed as per Annexure A6.1 A.6.2 A.6.3 (mentions the
steps for bus initialization). can any of you suggest a way to do
this.

 Regards
 Saugata


 On 5 December 2011 16:59, Subhash Jadavani subha...@codeaurora.org wrote:


 -Original Message-
 From: Girish K S [mailto:girish.shivananja...@linaro.org]
 Sent: Monday, December 05, 2011 12:20 PM
 To: Subhash Jadavani
 Cc: linux-...@vger.kernel.org; patc...@linaro.org; linux-samsung-
 s...@vger.kernel.org; Chris Ball
 Subject: Re: [PATCH V5] mmc: core: HS200 mode support for eMMC 4.5

 On 5 December 2011 11:46, Subhash Jadavani subha...@codeaurora.org
 wrote:
 
 
  -Original Message-
  From: Girish K S [mailto:girish.shivananja...@linaro.org]
  Sent: Friday, December 02, 2011 5:08 PM
  To: Subhash Jadavani
  Cc: linux-...@vger.kernel.org; patc...@linaro.org; linux-samsung-
  s...@vger.kernel.org; Chris Ball
  Subject: Re: [PATCH V5] mmc: core: HS200 mode support for eMMC 4.5
 
  On 2 December 2011 00:02, Subhash Jadavani subha...@codeaurora.org
  wrote:
  
  
   -Original Message-
   From: linux-mmc-ow...@vger.kernel.org [mailto:linux-mmc-
   ow...@vger.kernel.org] On Behalf Of Girish K S
   Sent: Thursday, December 01, 2011 7:48 PM
   To: Subhash Jadavani
   Cc: linux-...@vger.kernel.org; patc...@linaro.org; linux-samsung-
   s...@vger.kernel.org; Chris Ball
   Subject: Re: [PATCH V5] mmc: core: HS200 mode support for eMMC
 4.5
  
   On 1 December 2011 16:27, Subhash Jadavani
 subha...@codeaurora.org
   wrote:
   
   
-Original Message-
From: linux-mmc-ow...@vger.kernel.org [mailto:linux-mmc-
ow...@vger.kernel.org] On Behalf Of Girish K S
Sent: Thursday, December 01, 2011 3:58 PM
To: Subhash Jadavani
Cc: linux-...@vger.kernel.org; patc...@linaro.org; linux-
 samsung-
s...@vger.kernel.org; Chris Ball
Subject: Re: [PATCH V5] mmc: core: HS200 mode support for eMMC
  4.5
   
On 1 December 2011 15:33, Subhash Jadavani
  subha...@codeaurora.org
wrote:
 Hi Girish,

 -Original Message-
 From: linux-mmc-ow...@vger.kernel.org [mailto:linux-mmc-
 ow...@vger.kernel.org] On Behalf Of Girish K S
 Sent: Wednesday, November 30, 2011 2:24 PM
 To: linux-...@vger.kernel.org
 Cc: patc...@linaro.org; linux-samsung-soc@vger.kernel.org;
 subha...@codeaurora.org; Girish K S; Chris Ball
 Subject: [PATCH V5] mmc: core: HS200 mode support for eMMC
 4.5

 This patch adds the support of the HS200 bus speed for eMMC
  4.5
 devices.
 The eMMC 4.5 devices have support for 200MHz bus speed.The
 mmc
   core
and
 host modules have been touched to add support for this
 module.

 It is necessary to know the card type in the sdhci.c file
 to
  add
 support
 for eMMC tuning function. So card.h file is included to
 import
   the
card
 data structure.

 cc: Chris Ball c...@laptop.org
 Signed-off-by: Girish K S girish.shivananja...@linaro.org
 ---
 Changes in v5:
       Reduced the case statements for better code
 readability.
Removed
       unused macro definitions. Modified the tuning
 function
prototype
       and definition to support tuning for both SD and eMMC
   cards.
 Changes in v4:
       Rebased onto chris-mmc/mmc-next branch. This patch is
 successfully
       applied on commit with id
 de022ed3fdc14808299b2fa66dbb1ed5ab921912.
 Changes in v3:
       In the previous commits of chris-mmc/mmc-next branch,
  the
patch
 with
       commit id (c0f22a2c92e357e7cb3988b0b13034d70b7461f9)
   defines
 caps2 for
       more capabilities. This patch version deletes the
 member
 ext_caps(created
       in my earlier patch) from struct mmc_host and reuses
   already
 accepted
       caps2 member.
 Changes in v2:
       Rebased to latest chris-mmc/mmc-next branch. Resolved
indentation
       problems identified in review. This patch has to be
  applied
 before
       the patch released for modifying the printk messages.
 Changes in v1:
       Case statements in switch that produce same result
 have
       been combined to