platform: msm_shared: Add support for external source clock

For clocks whose parent clocks are not under control of bootloader
need to be initialized differently, Add F_EXT_SRC macro for the
same.

CRs-Fixed: 610350
Change-Id: Ia514f620a9f6d08c561e20a296f8764e5816da72
diff --git a/platform/msm_shared/include/clock_lib2.h b/platform/msm_shared/include/clock_lib2.h
index e808c87..afa0d8c 100644
--- a/platform/msm_shared/include/clock_lib2.h
+++ b/platform/msm_shared/include/clock_lib2.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2013, Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2014, Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -58,6 +58,17 @@
                               | BVAL(10, 8, s##_source_val), \
         }
 
+/* F(frequency, source, div, m, n) */
+#define F_EXT_SRC(f, s, div, m, n) \
+        { \
+                .freq_hz = (f), \
+                .m_val   = (m), \
+                .n_val   = ~((n)-(m)) * !!(n), \
+                .d_val   = ~(n),\
+                .div_src_val = BVAL(4, 0, (int)(2*(div) - 1)) \
+                              | BVAL(10, 8, s##_source_val), \
+        }
+
 /* F_MM(frequency, source, div, m, n) */
 #define F_MM(f, s, div, m, n) \
 	{ \